random element in array (undefined if array is empty)
require: randomInt()
// ⭐️ arr.randomElement Object.defineProperty(Array.prototype, 'randomElement', { get() { return this[randomInt(this.length)] } }); // ⭐️ randomElement(arr) function randomElement(arr){ return arr[randomInt(arr.length)]; }
randomPassword()
Password Generator - app
randomElement()
arr.randomElement is a getter/setter.
string.random()
string.shuffle()
Last updated 1 year ago