Created
September 6, 2017 22:01
-
-
Save jimblandy/adb717da0762cdef32bf383ab2f22151 to your computer and use it in GitHub Desktop.
Demonstration of `this` value for functions found on `with` operands
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
let obj = { f: function() { console.log(this === obj); } }; | |
with (obj) f(); | |
// output: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment