Finished Exercise die-roller app
This commit is contained in:
parent
27ae78051d
commit
ec3f1666c0
@ -7,8 +7,8 @@
|
|||||||
<body>
|
<body>
|
||||||
<h1>
|
<h1>
|
||||||
<script>
|
<script>
|
||||||
// get a random number between 0 and 6
|
// get a random number between 0 and 8
|
||||||
const randNum = Math.random() * 6;
|
const randNum = Math.random() * 9;
|
||||||
|
|
||||||
// round up to get a number from 1 to 6.
|
// round up to get a number from 1 to 6.
|
||||||
const dieRoll = Math.ceil(randNum);
|
const dieRoll = Math.ceil(randNum);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user