Math.round(rndNum) : Math « Development « JavaScript DHTML
- JavaScript DHTML
- Development
- Math
Math.round(rndNum)
<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
rndNum = Math.random();
rndNum = rndNum * 10;
alert(Math.round(rndNum));
</script>
</head>
<body>
</body>
</html>
Related examples in the same category