Dapatkan nilai acak dari array di JS

const randomElement = array[Math.floor(Math.random() * array.length)];
Gifted Gorilla