Created
February 22, 2016 18:40
-
-
Save kavitshah8/8c741796664a98c8f21f to your computer and use it in GitHub Desktop.
arrow functions
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 ViewSomething() { | |
this.a = 42 | |
this.click = function() => { | |
alert(this.a) // undefined | |
} | |
this.click1 = () => { | |
alert(this.a) // 42 | |
} | |
} | |
// also the arguments key word is different |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment