|
|
|
|
|
by ufo
4824 days ago
|
|
> The var statement in a while loop gives me the impression this person doesn't know how scope works in JavaScript. I'm not the author of queue.js but I actually declaring my Javascript variables as close to their use point as possible because JSHint warnings let me pretend that JS had real block scope all along. You would be amazed how often it catches "variable used out of scope" errors that would not be caught if the declarations had been hoisted to the top of the function. |
|