Hi all,
I’m collecting information about my trial in a list called myList
(this list is then used to do some further processing). In Python, at the end of each trial, I’m appending information about the letter presented on the current trial like this:
myList.append(thisTrial["letter"])
In JavaScript, this does not seem to work, even after adding the name of the loop (i.e., trials
) before thisTrial
as suggested in another forum post:
myList.append(trials.thisTrial["letter"]);
I get the error message “TypeError: Cannot read property ‘letter’ of null”.
Given that I don’t really know anything about JavaScript, I’m at a loss at how to fix this issue.
This is a minimal example illustrating the issue.
Any help would be greatly appreciated.
Jan