/ Published in: Other
Generate random number between two integers
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var lower = 2; var higher = 10; var randomNum = Math.round(Math.random() * (higher - lower)) + lower;