Skip to main content Accessibility Feedback

Numbers

Math.random()

Returns a random float (decimal) between 0 and 1.

This is not cryptographically secure. Do not use it for anything security related.

// returns random decimal
Math.random();

Preorder my new course on Web Components! Want to learn how to build Web Components from scratch, master best practices, and more? Preorder today and get $100 off of the launch price.


Find this useful? You can support my work by purchasing an annual membership.