Closed dwiehoff closed 4 years ago
var array = [ "Apples", "Bananas", "Pears" ]; var randomItem = array[ Math.floor(Math.random() * array.length) ];
Hey @dwiehoff This already exists here: How to get random element from array in JavaScript