Feature request: Array.prototype.random
michalwadas at gmail.com
Thu Jun 15 21:34:03 UTC 2017
I believe it's too specialized to be a part of Array interface.
Though, I think JS should have better support for randomness, so we could
On 15 Jun 2017 20:42, "Will White" <w.white9 at icloud.com> wrote:
I would like to propose Array.prototype.random, which would return a random
array element the same way `array[Math.floor(Math.random() *
array.length)]` does, because every time I want a random array element, I
have to remember how to do it. Do you think this is a useful addition to
es-discuss mailing list
es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss