Hi @M11, if the code is not being output correctly, it means there is some issue stopping the code from being compiled. The translations above would be made easier if you surround your code in backticks (```). Try:
msg = '';
if (mouse.getPressed()[0] === 1) { // If left mouse button pressed
clickable = [R, F]; // clickable stim
for (const obj of clickable) { // for each clickable stim, check if it contains the mouse
if (obj.contains(mouse)) {
if (obj === R && R === eval(MathCorr) ) {
msg = "Correct";
psychoJS.experiment.addData('MathScore', R === eval(MathCorr));
} else if (obj === F && F === eval(MathCorr) ) {
msg = "Wrong. Click buttons more exactly";
psychoJS.experiment.addData('MathScore', F === eval(MathCorr));
}
}
}
}