random int between two numbers

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

random integer between two numbers

Copy this code and paste it in your HTML
  1. function randomIntBetween(min, max) {
  2. return Math.round(Math.random() * (max - min) + min);
  3. }
  5. // randomIntBetween(1,100);

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.