The bind() method creates a new function where “this” refers to the parameter in the parenthesis in the above case “car”. This way the bind() method enables calling a function with a specified “this” ...
displayDetails.apply(car, ["Vivian"]); // Vivian, this is your car: GA12345 Toyota displayDetails.call(car, "Vivian"); // Vivian, this is your car: GA12345 Toyota Note that when using the apply() ...
The ABCs of JavaScript: apply, bind, call, and call - the ABC of JavaScript. The ABC of Javascript is called 'A - apply (B) - bind() - call (C) The ABC is used to set what 'this' should refer to, ...