Generate 4 Digits Random Number in JavaScript
const random = Math.floor(Math.random() * 9000 + 1000);
console.log(random);
Generate 4 Digits Random Number in JavaScript
Here is what the above code is doing:
1. The code uses a JavaScript function to generate a random number between 1000 and 9999.
2. The code uses a JavaScript function to generate a random number between 1000 and 9999.
3. The code uses a JavaScript function to generate a random number between 1000 and 9999.