Open SamerElaila opened 6 years ago
In this line https://github.com/facg3/chemics/blob/cc6da16a2f605969bfaababa5abc402954321073/src/router.js#L26
you guys are using for loop with var which can cause a lot of problems in scoping if there was a delay in executing the code inside the for loop
look for javascript scope for more informations.
afaik this is preferable. Initialising i without var means you're creating an implicit global which is generally problematic. I'll read up to see if there's a reason not to, as you say, though.
i
var
In this line https://github.com/facg3/chemics/blob/cc6da16a2f605969bfaababa5abc402954321073/src/router.js#L26
you guys are using for loop with var which can cause a lot of problems in scoping if there was a delay in executing the code inside the for loop
look for javascript scope for more informations.