JavaScript math random

04:36 0 Comments A+ a-

<html>
<body>

<script type="text/javascript">

//return a random number between 0 and 1
document.write(Math.random() + "<br />");

//return a random integer between 0 and 10
document.write(Math.floor(Math.random()*11));

</script>

</body>
</html>

Result