Skip to content

Instantly share code, notes, and snippets.

@Bijesse
Forked from anonymous/index.html
Created October 22, 2015 15:21
Show Gist options
  • Select an option

  • Save Bijesse/f573356e04af640698b2 to your computer and use it in GitHub Desktop.

Select an option

Save Bijesse/f573356e04af640698b2 to your computer and use it in GitHub Desktop.
JS Console Dice Roll // source http://jsbin.com/weriqa
<!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>
/*
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