Instantly share code, notes, and snippets.

Embed
What would you like to do?
var customer2 = {
firstName: "Jane",
lastName: "Smith"
}
customer.calculateAge.call(customer2, 2016, 1984); // Prints "Jane is 32 years old"
customer.calculateAge.apply(customer2, [2016, 1984]); // Prints "Jane is 32 years old"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment