# How to get a pseudo-random number between 0 and 1 in JavaScript?

JavascriptWeb DevelopmentFront End Technology

To get a pseudo-random number between 0 and 1, use the Math.random() method in JavaScript.

## Example

You can try to run the following code to get a pseudo-random number between 0 and 1 −

<html>
<title>JavaScript Math random() Method</title>
</html>