Skip to content

Instantly share code, notes, and snippets.

@pwlin
Created August 3, 2010 10:00
Show Gist options
  • Save pwlin/506131 to your computer and use it in GitHub Desktop.
Save pwlin/506131 to your computer and use it in GitHub Desktop.
javascript random number
function RandomNumber(n1,n2){
return(Math.floor(Math.random()*(n2-n1))+n1);
}
n=RandomNumber(20,80);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment