/ Published in: JavaScript
![](/img/icon_sav.png?v3)
Uses vars `to` and `from`.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Math.floor(Math.random() * (to - from + 1) + from);
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)
Math.floor(Math.random() * (to - from + 1) + from);