COP3530 Assignment 1
Array Example
HTML
<input type="button" value="Pick One" onClick="thePick();" />
JavaScript
var classarray = [
"Adam",
"Amanda",
"David",
"Dylan",
"Janet",
"Jeffery",
"Morgan",
"Nyle",
"Roger",
"Ryan"
]
function thePick() {
alert(classarray[Math.floor(Math.random() * 10)]);
}