Get a random value from an array in JS
const randomElement = array[Math.floor(Math.random() * array.length)];
Source: stackoverflow.com
const randomElement = array[Math.floor(Math.random() * array.length)];