Created
December 31, 2013 22:12
-
-
Save koorosh13hm/8202744 to your computer and use it in GitHub Desktop.
Rahnamayii mikonid? lotfan.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Random</title> | |
<script type="text/javascript"> | |
//First part: | |
var randomizer = function go (){ | |
console.log(Math.random()); | |
}; | |
setInterval(randomizer , 1000); | |
//Second part: | |
function getRandomInt (min , max){ | |
console.log(Math.floor(Math.random() * (max - min + 1) + min)); | |
}; | |
setInterval(getRandomInt(0 , 15) , 1000); | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment