"You do not know JavaScript (on)," notes - lexical scope

Lexical scoping is a set of variables and on how to find the rules engine will find the variables where they are.

The most important feature is its definition of lexical scoping process takes place in the writing phase of the code (assuming you do not use eval () or with)

Deceive lexical: lexical scope refers to modifications to deceive lexical scoping can cause performance degradation.

Two ways: eval and with. eval (..) function If you accept code containing one or more statements, which will modify its lexical scope, but with the statement actually is based on the object you pass it out of thin air to create a new lexical area.

Guess you like

Origin www.cnblogs.com/simpul/p/11027199.html
Recommended