Node: Inheritance

Using the events and util classes in the core Node library, we can define inheritance:

var Events = require(‘events’);

var util = require(‘util’);

function hello() {

this.greeting = “Hi!”;


util.inherits(hello, Events);

What do you think?

0 points
Upvote Downvote

Total votes: 0

Upvotes: 0

Upvotes percentage: 0.000000%

Downvotes: 0

Downvotes percentage: 0.000000%

Written by Admin

I work for a Telecom company writing and testing software. My passion for writing code is expressed through this blog. It's my hope that it gives hope to any and all who are self-taught.

Node: Prototype Inheritance

YouTube will probably ban my account… here’s why