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