This is my condition file. I just wanted to show digits one by one, then have reaction time and response accuracy in output.
I took a look in earlier posts. I see that digits
is a string that you’d like to treat as an array (i.e. getting the number of characters and getting it’s length). In JS I’d write something like this:
// Get the length of a string
"hello".length
// Get the 3rd character
"hello"[2]
So my guess is that in JS, this call to list(...)
isn’t needed
Should I put this in which component and tab and routine?
which of the following should insert?
// Get the length of a string
“list”.length
// Get the 3rd character
“list”[2]
or
// Get the length of a string
“digits”.length
// Get the 3rd character
“digit”[2]
None of them. I noticed this forum thread is quite long. I recommend to first try some things out and develop some debugging skills, so that people posting here can help you more effectively. To get you started, see this gitlab project (and the ones it links to). Thomas Pronk / assignment_stroop · GitLab
Try deleting sequence = list(digits.toString()); and change the following line to
correct_answer = reversed(digits.toString());