Replies: 3 comments
-
Hi @mcvc968, I can't replicate the issue. I used your code as you pasted it. Here's the test site: https://bristle-spangled-syzygy.glitch.me/. If you open the console you can see the value of What version of jsPsych are you using? |
Beta Was this translation helpful? Give feedback.
-
Hi, Thank you for your response. I'm sorry, you're right! The problem is actually further down the script. In it I am trying to shuffle 'all_tests_shuffled_2' such that there are no more than three repeated neighbours and that is where I get the error about the second argument being a function. Sorry for the double question! var myarray_2 = [tests_A_flat, tests_B_flat, tests_rand_flat]; var all_tests_shuffled_2 = jsPsych.randomization.repeat(myarray_2, [9,9,2]);
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to loop through an array ('base') 3 times and generate 3 randomised arrays with no repeating neighbours. I am trying to do this using jsPsych.randomization.shuffleNoRepeats . I keep getting the error 'Second argument to jsPsych.randomization.shuffleNoRepeats() must be a function' and I was wondering if I am using it wrong syntax? I am attaching the relevant portion of the code below. Thank you for your help in advance.
Beta Was this translation helpful? Give feedback.
All reactions