Skip to content
Discussion options

You must be logged in to vote

Hi @chester108, is that what you're looking for?

var response_accuracy = [];
var trial = {
  type: 'image-keyboard-response',
  stimulus: 'imgA.png',
  on_finish: function(data) {
    var acc;
    if(data.key_press == 85){
      acc = true;
    } else {
      acc = false;
    }
    data.correct = acc;  // save response accuracy to the trial data
    response_accuracy.push(acc);  // add the response accuracy to the array
  }
};

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@chester108
Comment options

@becky-gilbert
Comment options

@chester108
Comment options

@chester108
Comment options

@becky-gilbert
Comment options

Answer selected by becky-gilbert
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