-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmath.js
More file actions
30 lines (21 loc) · 730 Bytes
/
Copy pathmath.js
File metadata and controls
30 lines (21 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*const min = 50;
const max = 100;
let randomNum = Math.floor(Math.random() * (max - min)) + min;
console.log(randomNum);*/
const mybutton = document.getElementById('mybutton');
const label1 = document.getElementById('label1');
const label2 = document.getElementById('label2');
const label3 = document.getElementById('label3');
const min = 1;
const max = 6;
let randomNum1;
let randomNum2;
let randomNum3;
mybutton.onclick = function(){
randomNum1 = Math.floor(Math.random() * max) + min;
randomNum2 = Math.floor(Math.random() * max) + min;
randomNum3 = Math.floor(Math.random() * max) + min;
label1.textContent = randomNum1;
label2.textContent = randomNum2;
label3.textContent = randomNum3;
}