JS: Function Call, Apply, Bind

By Xah Lee. Date: . Last updated: .

In JavaScript, any function defined by function , when called, has a associated value called “this binding”. In function body, the value of “this binding” is represented by the keyword this.

[see JS: “this” Binding]

When a function f is a property of a object x, and is called in the form x.f(…), the value of “this binding” is the object x.

The following are ways to let you call a function and explicitly pass a value of your choice for this binding.


Reflect.apply ( f, this_binding, arg_list ) → Call f with its this keyword having value of this_binding, and with arguments of elements in arg_list.

[see JS: Reflect.apply]


f.apply(obj, arg_list) → evaluate function f with f's this keyword have value of obj, and with arguments of elements in arg_list.

[see JS: Function.prototype.apply]


f.call(obj, arg1, arg2 etc) → evaluate f(arg1, arg2 etc) with f's this keyword having value of obj.

[see JS: Function.prototype.call]


f.bind(obj) → return a function such that it has the same behavior as f except f's this value is always obj.

f.bind(obj, args etc) → the new function will always be given the arguments args.

[see JS: Function.prototype.bind]

JS Function

  1. Define Function
  2. Arrow Function ⭐
  3. Function Params
  4. “arguments” Object
  5. Rest Params ⭐
  6. Arg Default Value ⭐
  7. Arg Destructure ⭐
  8. f Declaration vs Expression
  9. Closure
  10. f call apply bind
  11. Functional Programing

Like it? Help me by telling your friends. Or, Put $5 at patreon.

Or, Buy JavaScript in Depth

If you have a question, put $5 at patreon and message me.

Web Dev Tutorials