Reply To: Logging value of randomly chosen text

PennController for IBEX Forums Support Logging value of randomly chosen text Reply To: Logging value of randomly chosen text

#8289
mawilson
Participant

Nevermind; I figured out how to do this. I’ll post it in case anyone else comes across a similar issue.


Template("practice.csv", variable => {
    var word = variable['word_' + Math.floor(Math.random() * 12)];
    return newTrial("trial_prac",
        // ... whatever else you want here
        newText("word", word)
        // ... whatever else you want here
    ).log("word", word)
})