var myArray = ( "Apples", "Bananas", "Pears" ); var randomItem = myArray(Math.floor(Math.random()*myArray.length));
См. Pen gLJPZv Криса Койера (@chriscoyier) на CodePen.
var myArray = ( "Apples", "Bananas", "Pears" ); var randomItem = myArray(Math.floor(Math.random()*myArray.length));
См. Pen gLJPZv Криса Койера (@chriscoyier) на CodePen.