mercredi 31 mars 2021

How to randomly select an array out of several in JavaScript [duplicate]

I have three arrays with 2 strings each, and would like to randomly select one of the arrays.

array1 = ["hello", "world"];
array2 = ["all", "good"];
array3 = ["bye", "now"];

Something like collecting the three arrays into one, and then math.random? I'm working with JsPsych, in case it is relevant




Aucun commentaire:

Enregistrer un commentaire