Skip to content

OrderNot attempted

Precedence of this rules

Order the ways this gets decided, from HIGHEST priority to lowest (for regular functions).

Drag the rows, or use the arrows, to put them in order from first to last.

  1. Default binding: plain call fn() (undefined in strict mode)
  2. Implicit binding: method call obj.fn()
  3. Explicit binding: bind / call / apply
  4. new binding (constructor call)
Show answer & explanation

Correct order:

  1. new binding (constructor call)
  2. Explicit binding: bind / call / apply
  3. Implicit binding: method call obj.fn()
  4. Default binding: plain call fn() (undefined in strict mode)

new beats even a bound function. Hard binding beats a method call. Arrow functions sit outside this list entirely: they take this from their enclosing scope.