Skip to content
Discussion options

You must be logged in to vote

Hi @Swatermx, one problem might be that in this line:

var decoy_stim_list_unshuffled_repeated = jsPsych.randomization.repeat([decoy_stim_list_unshuffled], 2);

decoy_stim_list_unshuffled is inside of square brackets, but it's already an array. So the randomization function is repeating an array with just one element (the decoy stim list) and returning an array with two of those stim arrays. I'm guessing that's not what you want, and instead you need an un-nested array with two repetitions of each element in the decoy stim array? If so then you can just remove the square brackets.

BTW when debugging these sorts of problems, you might find it helpful to inspect the values of your variables. …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Swatermx
Comment options

@becky-gilbert
Comment options

@Swatermx
Comment options

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