JavaScript is said to have a combination of 2 things;
- Dynamic, runtime evaluation of Variable Object
- Static/lexical defined scope
Could someone please explain the above with some "tricky" examples which demonstrate and help understand the above points very clearly.
I assume static scope means the scope is based on where the function is physically defined in the code.