Created
March 11, 2016 00:14
-
-
Save kikar/78a196b8ef830c4e4327 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
function foo() { | |
console.log(arr.map( i => i + this.a )); | |
} | |
var arr = [1,2,3]; | |
var obj = { | |
a: 2, | |
foo: foo | |
}; | |
obj.foo(); // [3, 4, 5] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment