Compare commits
2 Commits
e0c065313e
...
e7a6cfb90a
| Author | SHA1 | Date | |
|---|---|---|---|
| e7a6cfb90a | |||
| 3b7753315b |
17
gameboard.js
Normal file
17
gameboard.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
let time = 60;
|
||||||
|
let timerElement = document.getElementById("timer");
|
||||||
|
|
||||||
|
let countdown = setInterval(() => {
|
||||||
|
|
||||||
|
time--;
|
||||||
|
timerElement.textContent = time;
|
||||||
|
|
||||||
|
if (time <= 0) {
|
||||||
|
clearInterval(countdown);
|
||||||
|
timerElement.textContent = "0";
|
||||||
|
|
||||||
|
alert("Waktu Habis");
|
||||||
|
}
|
||||||
|
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user