Skip to content

Instantly share code, notes, and snippets.

@mvasilkov
Created February 20, 2014 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvasilkov/9109339 to your computer and use it in GitHub Desktop.
Save mvasilkov/9109339 to your computer and use it in GitHub Desktop.
function foo() {
this.a = function () { return 96 }
this.b = function () { return this.a() * 10101 }
}
function bar() {}
bar.prototype = new foo
b = new bar
b.a() // 96
b.b() // 969696
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment