I'm experiencing an issue with the following if condition:
function turnLedOn1(evt) {
led.on();
var executed = false;
if (!executed) {
executed = true;
checkin1 = timestamp;
alert('checkin1');
}
}
Despite the intended behavior of only executing the if loop once, I am receiving multiple alerts (around 15) before it stops. Any suggestions on why this might be happening?