of curiosity. Short answer: declared inside the loop, the var is still gets declared as if it was at the beginning of the holding function. So, no need for declaration inside the for loop. That’s es5. Things gets a bit different in es6 grounds. Look up “scopes es6”
so is shoud declare variavles outside of loop ? before loop ?
Обсуждают сегодня