Skip to content
Discussion options

You must be logged in to vote

Hi @j22tis, I like this approach and I think it should work. I think the reason your last step isn't working is because you're sampling from an array of strings, rather than sampling the actual objects that are named with those strings. So try doing it without the quotes around hard_block and easy_block:

var blocks = [hard_block, easy_block];

var experimental_timeline = jsPsych.randomization.sampleWithReplacement(blocks, 6);

experimental_procedure = {
     timeline: experimental_timeline
} 

Does that work?

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@becky-gilbert
Comment options

@j22tis
Comment options

@becky-gilbert
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