/call-inlining-after.js Secret
Created
September 25, 2014 20:39
Star
You must be signed in to star a gist
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
/* INLINED CODE */ | |
function doSomething(x, y) { | |
// o1.add called with o2 as | |
// its `this` binding. | |
return o1.add(x, y); | |
} | |
We wanted to avoid saying o2.add
as that implies the add
method of o2
.
This is why the code comment states that it's o1.add
called with o2
as its this
binding.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shouldn't it be
o2.add(x, y)
here? ;)