Skip to content

Instantly share code, notes, and snippets.

@Takazudo
Created October 14, 2010 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Takazudo/625936 to your computer and use it in GitHub Desktop.
Save Takazudo/625936 to your computer and use it in GitHub Desktop.
random val
/* random val 40~60 */
function randomNum(from, to){
return from + Math.floor( Math.random() * (to - from + 1) );
}
console.log(random(40,60));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment