window.addEventListener not working properly inside a conditional

Need some help with mousemove events within a conditional. I’ve created a variable to track the current state, and want it to trigger additional mousemove events only when active. Currently, this is the code I have: let awake = 0; window.addEventListener(‘click’, function(e){ if (awake === 0){ //Do something awake = 1; console.log(awake); } else {… Read More window.addEventListener not working properly inside a conditional