Created
September 6, 2018 13:26
-
-
Save jordanhudgens/4ddaaf596bbaf3cb26cbf06348c47af9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const userOne = { | |
firstName: "Kristine", | |
lastName: "Hudgens" | |
}; | |
const userTwo = { | |
firstName: "Tiffany", | |
lastName: "Hudgens" | |
}; | |
// Function expression | |
const fullName = function() { | |
return `${this.lastName}, ${this.firstName}`; | |
}; | |
// Nope! | |
// const fullName = () => { | |
// return `${this.lastName}, ${this.firstName}`; | |
// }; | |
const kristine = fullName.bind(userOne); | |
const tiffany = fullName.bind(userTwo); | |
kristine(); //? | |
tiffany(); //? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment