I must be missing something simple, but can someone explain why the following occurs in a function running on setInterval:
var num = 10;
function my() {
if (num2){
// script never gets here
}
else {
num--;
if (num<1) {
var num2 = 1;
}
}
}
I've verified that it initializes num2, but it never goes in the first conditional.