Created
May 7, 2017 10:38
-
-
Save lenafaure/02577e409085aac00312c857f462d09a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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