Skip to content
Discussion options

You must be logged in to vote

Hi @kassyec! First of all, there are no bad questions. Lots of researchers are new coding, and especially to web programming.

Assuming you have some different stimulus lists that correspond to each of these conditions, then what I would do is create some if/else statements that check the value of condition_assignment, and use that to create an array of trial information. Then, you would use that trial information array to run your experiment. Here's a little example using timeline variables:

  // randomly assign a condition
  var condition_assignment = jsPsych.randomization.sampleWithoutReplacement(['LIST1', 'LIST2'], 1)[0];
  jsPsych.data.addProperties({
    condition: condition_assignment

Replies: 1 comment 6 replies

Comment options

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

@kassyec
Comment options

@becky-gilbert
Comment options

@inesmar7
Comment options

@jodeleeuw
Comment options

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