Ranked beginner quiz program
See https://github.com/coolaj86/knuth-shuffle for a shuffle function.

function shuffle(array) {
  var currentIndex = array.length, temporaryValue, randomIndex ;

  // While there remain elements to shuffle...
  while (0 !== currentIndex) {

    // Pick a remaining element...
    randomIndex = Math.floor(Math.random() * currentIndex);
    currentIndex -= 1;

    // And swap it with the current element.
    temporaryValue = array[currentIndex];
    array[currentIndex] = array[randomIndex];
    array[randomIndex] = temporaryValue;
  }

  return array;
}


And write something like:

var correct = 0, answer = new Array();
var myQuestions = [ // my delimiter is ::, use any delimiter you like 
  "Name a Programming language thats also a gem::ruby",
  "Name a Programming language thats also a snake::python",
  "What language do we use to style webpages?::css",
  "What language do you use to build the structure of a web page?::html",
  "What core language do you use to add interactivity to a web page?::javascript"
]
shuffle(myQuestions);

for(i = 0; i &lt; myQuestions.length; i++) {
  answer[i] = prompt(myQuestions[i].substring(0,myQuestions[i].indexOf("::")));
  if(answer[i].toUpperCase() == myQuestions[i].substring(myQuestions[i].indexOf("::")+2).toUpperCase()) { // +2 because string is 2 characters and array starts at 0
    correct++;
  }
}


And so on &hellip;

I always say to minimize absolute code (never use it if it's possible). In this way, your code is more flexible leaving room for additions and improvements (you can improve on this code to include multiple answers as seen in your original code).