Skip to content

Instantly share code, notes, and snippets.

@videlais
Created May 2, 2014 15:02
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/bcf4d09dc34ec424bd53 to your computer and use it in GitHub Desktop.
Save videlais/bcf4d09dc34ec424bd53 to your computer and use it in GitHub Desktop.
JS Lesson 5
function A() {
this.value = 1;
}
function B(){
A.call(this);
this.secondValue = 2;
}
var C = new B();
//C has both value (from A) and secondValue (from B)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment