Skip to content

Instantly share code, notes, and snippets.

View scott2449's full-sized avatar
🍕
🍔🌭🌮🍟

Scott Rahner scott2449

🍕
🍔🌭🌮🍟
  • Dow Jones
  • New Jersey
View GitHub Profile
@scott2449
scott2449 / dog.js
Created June 19, 2012 18:45 — forked from sandeep45/dog.js
example of inheriting EventEmitter in node
var emitter = require('events').EventEmitter;
var util = require('util');
var dog = function(){};
//dog.prototype = {
// name: "i am a dog",
//};
// 1st way of inheriting
//dog.prototype.__proto__ = new emitter();