-
-
Save Bijesse/f573356e04af640698b2 to your computer and use it in GitHub Desktop.
JS Console Dice Roll // source http://jsbin.com/weriqa
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>JS Console Dice Roll</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> | |
| /* | |
| Dice Game | |
| Directions: Make a program that randomly displays a number 1 through 6 to the console | |
| Instructions: | |
| 1. Use Math.random to display a random number between 0 and 1 | |
| 2. Multiply your Math.random function by 6 | |
| 3. Use Math.floor to only display whole numbers between 1 and 6 | |
| */ | |
| var dice = | |
| //TODO: Insert you code here | |
| console.log(dice); | |
| </script> | |
| <script id="jsbin-source-html" type="text/html"> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>JS Console Dice Roll</title> | |
| </head> | |
| <body> | |
| </body> | |
| </html> | |
| </script> | |
| <script id="jsbin-source-javascript" type="text/javascript">/* | |
| Dice Game | |
| Directions: Make a program that randomly displays a number 1 through 6 to the console | |
| Instructions: | |
| 1. Use Math.random to display a random number between 0 and 1 | |
| 2. Multiply your Math.random function by 6 | |
| 3. Use Math.floor to only display whole numbers between 1 and 6 | |
| */ | |
| var dice = | |
| //TODO: Insert you code here | |
| console.log(dice); | |
| </script></body> | |
| </html> |
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
| /* | |
| Dice Game | |
| Directions: Make a program that randomly displays a number 1 through 6 to the console | |
| Instructions: | |
| 1. Use Math.random to display a random number between 0 and 1 | |
| 2. Multiply your Math.random function by 6 | |
| 3. Use Math.floor to only display whole numbers between 1 and 6 | |
| */ | |
| var dice = | |
| //TODO: Insert you code here | |
| console.log(dice); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment