Created
July 12, 2017 05:40
-
-
Save jazzedge/f5bbfa34347a00d6ea3c6291efe14d12 to your computer and use it in GitHub Desktop.
Bot Random integer
This file contains hidden or 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
| // Call like this: | |
| var r = randomInt(1,10); | |
| //Display like this: | |
| session.send ('Random n.'+ r); // Use the plus sign, not a comma. | |
| // Generate a random integer between low and high | |
| function randomInt (low, high) { | |
| return Math.floor(Math.random() * (high - low) + low); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment