randomElement()

random element of an array

// ⭐️ global: randomElement(arr)
function randomElement(arr){
    return arr[randomInt(arr.length)];
}

Last updated