+ 4
in js : var myArray = [ "Apples", "Bananas", "Pears" ]; var randomItem = myArray[Math.floor(Math.random()*myArray.length)]; document.body.innerHTML = randomItem;
26th Dec 2017, 11:49 PM
Hessam Nabavi
Hessam Nabavi - avatar