Javascript Random number between


/ Published in: JavaScript
Save to your folder(s)

Uses vars `to` and `from`.


Copy this code and paste it in your HTML
  1. Math.floor(Math.random() * (to - from + 1) + from);

Report this snippet


Comments


You need to login to view comments.