Skip to content

Instantly share code, notes, and snippets.

@videlais
Last active August 29, 2015 14:00
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 videlais/d9bec510177e35c51d0a to your computer and use it in GitHub Desktop.
Save videlais/d9bec510177e35c51d0a to your computer and use it in GitHub Desktop.
JS Lesson 7
function A() {
this.value = 1;
}
A.prototype.getValue = function() {
return this.value;
};
function B() {
A.call(this);
}
B.prototype = Object.create(A.prototype);
B.prototype.constructor = B;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment