How to generate random numbers in Javascript
How to generate random numbers in Javascript??
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Test Page</title>
</head>
<body>
<script type="text/javascript">
var x = Math.round((Math.random()*100));
console.log(x);
</script>
</body>
</html>
Here is the output to this code in console(ctrl+shift+I):
Comments
Post a Comment
I WOULD APPRECIATE IF YOU LEAVE A COMMENT OR YOUR FEEDBACK HERE !!!