In JavaScript, `call()`, `bind()`, and `apply()` are methods available on functions and are used to manipulate how functions are invoked and bound to a specific context. Here's an explanation of each of these methods: 1. `call()`: The `call()` method is used to call a function with respect to any object. The `call()` method takes the context object as its first argument, followed by the arguments to be passed to the function. Syntax: `function.call(context, arg1, arg2, ...)` Example:

function greet(name) {
  console.log(`Hello, ${name}! My name is ${this.name}.`);
}

const person = {
  name: 'Alice'
};

greet.call(person, 'Bob');

Output:

Hello, Bob! My name is Alice.

In the example above, `call()` is used to invoke the `greet()` function with the `person` object as the context. The first argument `person` sets `this` inside the function to refer to the `person` object. 2. `bind()`: The `bind()` method creates a new function with a specified context and initial arguments, without invoking it immediately. It returns a new function that, when called, has its `this` value set to the provided context and any additional arguments are prepended to the original function's arguments. Syntax: `function.bind(context, arg1, arg2, ...)` Example:

function greet(name) {
  console.log(`Hello, ${name}! My name is ${this.name}.`);
}

const person = {
  name: 'Alice'
};

const greetPerson = greet.bind(person);

greetPerson('Bob');

Output:

Hello, Bob! My name is Alice.

In the example above, `bind()` is used to create a new function `greetPerson` that has its `this` value bound to the `person` object. The resulting function `greetPerson` can be invoked later with the remaining arguments. 3. `apply()`: The `apply()` method is similar to `call()`, but it takes arguments as an array or an array-like object instead of individual arguments. It is used to invoke a function immediately, specifying the context and an array of arguments to be passed to the function. Syntax: `function.apply(context, [arg1, arg2, ...])` Example:

function greet(name) {
  console.log(`Hello, ${name}! My name is ${this.name}.`);
}

const person = {
  name: 'Alice'
};

greet.apply(person, ['Bob']);


Output:

Hello, Bob! My name is Alice.

In the example above, `apply()` is used to invoke the `greet()` function with the `person` object as the context and an array containing the argument `'Bob'`. To summarize: - `call()` invokes a function immediately with a specified context and individual arguments. - `bind()` creates a new function with a specified context and initial arguments, without invoking it immediately. - `apply()` invokes a function immediately with a specified context and an array of arguments. These methods provide flexibility in managing the execution context (`this`) and arguments when working with JavaScript functions.