Created
March 26, 2022 18:10
-
-
Save rehasantiago/8527b49d0b92de8e44cdc42aa99633d9 to your computer and use it in GitHub Desktop.
Revealing the mystery behind this - https://readosapien.com/revealing-the-mystery-behind-this
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
function singerName() { | |
console.log(this.name); | |
} | |
let singer1 = {name: 'Taylor Swift'}; | |
let taylor = singerName.bind(singer1); | |
taylor(); // Taylor Swift |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment