-
-
Save luisafvaca/e21b6e77090791cc15ccc410b2e4e6d2 to your computer and use it in GitHub Desktop.
Arrow function VS Anonymous function
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
//Considering this code. | |
var person = π©π»βπ¦°; | |
var myObjectLiteral = { | |
person: "π©π»βπ¦³", | |
sayHi: function(){ console.log(`Hi ${this.person}`)} | |
} // Hi "π©π»β𦳠| |
var myObjectLiteral = { | |
person: "π©π»βπ¦³", | |
sayHi: () => { console.log(`Hi ${this.person}`)} | |
} // Hi π©π»βπ¦° |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment