Skip to content

Instantly share code, notes, and snippets.

@notionparallax
Created March 3, 2014 03:20
Show Gist options
  • Save notionparallax/9317883 to your computer and use it in GitHub Desktop.
Save notionparallax/9317883 to your computer and use it in GitHub Desktop.
function studPick() {
var studentList = ["Daniel", "Judge","Jonathan", "John", "Amethyst", "Noah", "Antonio", "Ramon", "Aidan", "Manuel", "Ingrid", "Anastasia", "Annabella", "Christella", "La'Kym", "Isabella", "Hadiyah", "Jersey S", "Aviana", "Zion", "Carlos", "Loren", "Irie", "Trinidad", "Jersey W", "Stella"]
var random = Math.ceil(Math.random() * studentList.length);
console.log("random = " + random + ".");
student = studentList[random];
alert("Randomly picked student: " + student + ".")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment