Skip to content

Retrieving timeline variables across trials #839

Answered by jodeleeuw
wsr017 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @wsr017,

When you use jsPsych.timelineVariable() inside a function you have to set the second parameter to true.

correct_answer = jsPsych.timelineVariable('correct_key', true); 

The docs describe why here: https://www.jspsych.org/overview/timeline/#timeline-variables. This is a common mistake that we're thinking about how to make more intuitive! (see #788)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wsr017
Comment options

Answer selected by jodeleeuw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants