What is the difference between call, apply and bind?

function hello(greeting, mark) {
  console.log(greeting + ", " + this.name + mark);
}
const person = { name: "Maria" };

hello.call(person, "Hi", "!");
hello.apply(person, ["Hello", "?"]);
const bound = hello.bind(person, "Hey");
bound(".");

Output:

Tutorials Class - Output Window

Hi, Maria!
Hello, Maria?
Hey, Maria.

MethodRuns now?Arguments
callYesOne by one
applyYesAs an array
bindNo, returns a new functionOne by one, can be set in advance

Learn more about the similar topics:
Tutorials
JavaScript Functions
JavaScript Arrow Functions
Constructor Functions in JavaScript
JavaScript this Keyword
Exercises & Assignments
No Content Found.
Interview Questions & Answers
What are arrow functions in JavaScript?
What is the this keyword in JavaScript?
What is the difference between call, apply and bind?
What is the difference between debounce and throttle?
What is the difference between function declaration and function expression?
What is a closure in JavaScript?