How to make questions apear in random order from a list on studio code.org

281 views Asked by At
var questionsList = ["what sense do you use to identify the color of something?", "what sense would you use to tell if someone is wearing perfume? ", "what sense would you use to listen to music? ", "what sense would you use to know if the food is sweet or salty?", "what sense would you use to tell if the blanket is wet or dry?"]; 

onEvent("randomMiddleQuestion", "click", function(updateScreen ) {
  setText("randomMiddleQuestion", "what sense do you use to identify the color of something?");
});


onEvent("randomMiddleQuestion", "click", function() {
  questionsList = randomNumber(0, questionsList.length - 1);
  updateScreen();
});
function updateScreen() {
  setProperty("randomMiddleQuestion", "text", questionsList[index]);
}

I want to make an on event for when a text box is clicked, a set of questions appear in no particular oder

0

There are 0 answers