Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View child.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14
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;
View child.js
1 2 3 4 5
var Child = require('./child');
child = new Child();
 
child.A();
child.C();
View child.js
1 2 3 4 5 6 7 8 9
var Parent = function() {};
 
Parent.prototype = {
C: function() {
console.log('Parent#C');
}
};
 
module.exports = Parent;
Owner

Running:

$ git clone https://gist.github.com/4704412.git && cd 4704412
$ node main.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.