Thanks for your last answer.
I spend long time to figure out how to translate my simple Python code to JS code.
I think I partly success
From Py
If key_resp_2.corr:
trials.finished = 1
to JS
If (key_resp_2.corr >0) {
trials.finished = true;
}
However, it still doesn’t work. I think the problem is at “trials.finished = true”, do you know how to code that in JS? or could you give some hint? so I can continue exploring. Really don’t want to give up.
Thanks in advance!