Last active
December 12, 2015 03:08
-
-
Save BinaryMuse/4704412 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Parent = require('./parent'), | |
util = require('util'); | |
var Child = function() { | |
this.child = 'child'; | |
}; | |
util.inherits(Child, Parent); | |
Child.prototype.A = function() { | |
console.log('Child#A'); | |
}; | |
module.exports = Child; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Child = require('./child'); | |
child = new Child(); | |
child.A(); | |
child.C(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Parent = function() {}; | |
Parent.prototype = { | |
C: function() { | |
console.log('Parent#C'); | |
} | |
}; | |
module.exports = Parent; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running: