I have the following if condition:
function turnLedOn1(evt) {
    led.on();
    var executed = false;
    if (!executed) {
        executed = true;
        checkin1 = timestamp;
        alert('checkin1');
    }
}
The if loop should only be executed once, but i get like 15 alerts until it stops. Does anybody have an idea why?
 
     
     
     
    