Please enable JavaScript.
Coggle requires JavaScript to display documents.
THIS, Class, PROTOTYPE, DESIGN PATTERNS, :red_cross:, :check:, Not a…
THIS
OBJECT
-
Built-in Objects:
- String
- Number
- Boolean
- Object
- Function
- Array
- Date
- RegExp
- Error
-
-
-
This - one of the properties of execution context. Will be used
for the duration of function execution
-
-
4 rules:
1) Default binding (standalone function inv.)
2) Implicit binding
3) Explicit binding
4) new Binding
Class
-
-
-
-
:red_cross:
- Classes are often awkward to implement in prototype language like JS.
- class is syntactic sugar over prototype delegation mechanism
:check:
- cleaner code
-super(..) gives relative polymorphism capability
-class syntaxt protects from mistakes
-extends lets to extend even build in objects
-
-
-
-
- Not a reference to function itself
- Not a reference to function lexical scope
- A binding which is made when function is invoked
-