Generate a Random Number Between 1 and 10 in JavaScript

Generate Unique Random Numbers Between 1 and 10, How to Generate One Digit Random in JavaScript

Hello guys Today i will tell you through this Tutorial how to Generate Random Number JavasScript from 1 to 10.

Generate One Digit Random Number in JavaScript

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
var num = Math.floor(Math.random() * 10 + 1);
document.writeln(num);
</script>
</head>
<body>
</body>
</html>