Skip to content
Discussion options

You must be logged in to vote

Hi @woodenchair, the issue here is that the call-function plugin doesn't run the func function until after the experiment starts, when jsPsych reaches the test trial in your experiment timeline. But your console.log is in your main script so it's running before the function is called (when the page loads, before the experiment starts).

You can move the console.log into the newArray function to see when the function is called and to check that the randomization is working:

var newArray = function() {
  numbers_randomized = jsPsych.randomization.shuffle(numbers);
  console.log(numbers_randomized);
  return numbers_randomized;
};

You can also try calling the newArray function before the cons…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by sophief10
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