Skip to content

Instantly share code, notes, and snippets.

@hallettj
Created May 22, 2012 20:56
Show Gist options
  • Save hallettj/2771585 to your computer and use it in GitHub Desktop.
Save hallettj/2771585 to your computer and use it in GitHub Desktop.
Prototype Puzzle
function f() {}
f.prototype = { i: 10 };
var i = new f();
f.prototype = { j: 11 };
var j = new f();
equal(i.i, ?);
equal(i.j, ?);
equal(j.i, ?);
equal(j.j, ?);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment