Skip to content

Instantly share code, notes, and snippets.

@jdalton

jdalton/call-inlining-before.js Secret

Created Sep 25, 2014
Embed
What would you like to do?
/* ORIGINAL CODE */
function Thing(offset) {
this.offset = offset;
}
Thing.prototype.add = function(x, y) {
return this.offset + x + y;
};
var o1 = new Thing(1);
var o2 = new Thing(2);
function doSomething(x, y) {
return o1.add.call(o2, x, y);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment