They can be used to call an object method with another object as argument.
var person1 = {
  fullName: function() {
    return this.firstName + " " + this.lastName;
  }
}
var person2 = {
  firstName:"John",
  lastName: "Doe",
}
person1.fullName.call(person2);  // Will return "John Doe"
person1.fullName.apply(person2);  // Will return "John Doe"
by Luka Tatarishvili
4 years ago
JavaScript
objects
0
Pro tip: use ```triple backticks around text``` to write in code fences