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();

Join the Lean Web Club! Coaching. Courses. Coding resources. Get the skills, confidence, and support you need to learn front-end web development and achieve long-term success.


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