Object-Oriented or Object-Based
Lexical Scoping & Closure
Lexical scope is the position of some entity when it is lexically analyzed in some programming constructs. Apart from the variables that are defined globally, all the variables which are declared using var are local to the respective scope. Lexical scopes can be hierarchical and every outer lexical scope would be considered containing free variables with respect to current scope. Lexical scopes always have upward visibility when they are hierarchically defined.
If the function is name-spaced within some object then this points to the name-spaced object. The meaning of this keyword can be altered for a function on its call time; call and apply accept the first parameter as context that is internally treated as this.
Java Script host environment