3 ms·
I would argue that Javascript is not lexically scoped because the scope of a variable definition does not depend on the lexical structure of a program (with the
by gsg 13y ago
I would argue that Javascript is not lexically scoped because the scope of a variable definition does not depend on the lexical structure of a program (with the sole exception of function boundaries). This is true even to the point of multiple definitions having no effect on the scope of a variable.
I think that what you are arguing is that Javascript is statically scoped.
- kragen 13y ago"Statically scoped" is the same thing as "lexically scoped".