+ 1

JavaScript Math.random()

If I want an number between 1 and 10 using JS do I use Math.random and how?

17th Aug 2024, 10:03 AM
Dominic
1 Answer
+ 2
Dominic , please try to use google first, before you post this issue here. read this article, it contains also samples how to do this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
17th Aug 2024, 10:42 AM
Lothar
Lothar - avatar