DEV Community

Discussion on: Get a Random Element from an Array in JavaScript

Collapse
 
jonrandy profile image
Jon Randy 🎖️

You may want to be a bit clearer in your description of Math.random() - it can never return 1, but it can return 0

Collapse
 
gaelgthomas profile image
Gaël Thomas

That's right, thanks for the feedback! I'm updating the article right now! 😉