function dm() { (js code) }
function lm() { (js code) }
if (document.body.style.backgroundColor === "black") {
var lol = setInterval(dm, 20);
clearInterval(lol2);
}
else {
var lol2 = setInterval(lm, 20);
clearInterval(lol);
}
Anyone know why this setup isn’t working? Whenever I try it, both the intervals just keep running no matter what.