gdumitrescu
1/14/2016 - 2:59 PM

callables.md

Cheat sheet for callable entities in ES6

Value:

FDFEAFCM
Function-callable×
Constructor-callable××
PrototypeF.pF.pF.pSCF.p
Property prototype××

Whole construct:

FDFEAFCM
Hoisted×
Inner name××
window property×

Body:

FDFEAFCM
thislex
new.targetlex
super.prop××lex
super()

Abbreviations:

  • Column titles:
    • FD: Function declaration
    • FE: Function expression
    • AF: Arrow function
    • C: Class declaration and class expression (“body” entries refer to class constructor)
    • M: Method
  • Cells:
    • ✓ exists, allowed
    • × does not exist, not allowed
    • Empty cell: not applicable, not relevant
    • lex: lexical, inherited from surrounding lexical scope
    • F.p: Function.prototype
    • SC: superclass for derived classes, Function.prototype for base classes