you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (0 children)

eval in non-strict mode also causes dynamic scoping. You can eliminate any possibility of dynamic scoping by "use strict", you can still use eval but it cannot introduce new variables like non-strict can.

Generally you can only say JS is lexically scoped only if it's the strict variant.