-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.js
More file actions
29 lines (26 loc) · 759 Bytes
/
scripts.js
File metadata and controls
29 lines (26 loc) · 759 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
function lottoWhiteBalls() {
var lottoNums = [];
for (var i = 0; i < 5; i++) {
var temp = Math.floor(Math.random() * 70);
if (lottoNums.indexOf(temp) == -1) {
lottoNums.push(temp);
document.getElementById('whiteBall' + i).innerHTML = lottoNums[i];
} else {
i--;
}
}
}
function lottoMegaBall() {
document.getElementById('megaBall').innerHTML = Math.floor(Math.random() * 25) + 1;
}
function lottoNumbers() {
lottoWhiteBalls();
lottoMegaBall();
}
// let megaBall = document.getElementById('megaBall');
// let whiteBall = document.querySelectorAll('num5');
// megaBall.style.fontSize = '30px';
// megaBall.style.fontFamily = 'Ultra';
// megaBall.style.padding = '5px';
//
// whiteBall.style.fontFamily = 'Ultra';