Created
July 15, 2022 10:50
-
-
Save wibawasuyadnya/a8a21200327e1d0696d7958d27626e96 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var seat = 43; | |
document.getElementById('countdown').innerHTML = seat; | |
const myInterval = setInterval(decre, 15000); | |
function showChange(){ | |
seat = seat - 2 | |
document.getElementById('countdown').innerHTML = seat; | |
} | |
function decre(){ | |
if(seat > 41){ | |
showChange() | |
}else{ | |
clearInterval(myInterval); | |
window.setTimeout(showChange, 60000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment