Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Cheat sheet for callable entities in ES6

Value:

FD FE AF C M
Function-callable ×
Constructor-callable × ×
Prototype F.p F.p F.p SC F.p
Property prototype × ×

Whole construct:

FD FE AF C M
Hoisted ×
Inner name × ×
window property ×

Body:

FD FE AF C M
this lex
new.target lex
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
@ghost

This comment has been minimized.

Copy link

commented Jan 23, 2016

Everything operating normally.!!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.