URL of experiment: https://pavlovia.org/nedergaard_au/running_pilot_231019
Description of the problem:
I’m trying to execute something like this bit of code in order to get rid of duplicate responses:
const filtResp = respString.filter((item, index) => {
return respString.indexOf(item) === index;
});
But I get the following error message:
The code snippet works outside Pavlovia (i.e. JS Bin). I’ve had the same issue in Pavlovia with .split() and find it very strange as these are quite common methods. That one was fixed when I did .toString().split() though. I’m sure I’m making a mistake somewhere and I would really like to locate it.
Thank you!
Johanne