I'd say you're half-right, but adding a proper closure and applying the context or arguments would be a bit cleaner.
Check out this SO post for details: http://stackoverflow.com/questions/1728563/changing-the-scope-of-an-anonymous-function-on-a-settimeout-causes-a-weird-warni
I'd say you're half-right, but adding a proper closure and applying the context or arguments would be a bit cleaner.
Check out this SO post for details:
http://stackoverflow.com/questions/1728563/changing-the-scope-of-an-anonymous-function-on-a-settimeout-causes-a-weird-warni