Skip to content

Instantly share code, notes, and snippets.

@heapwolf heapwolf/19.js
Created Aug 6, 2012

What would you like to do?
function A() {
console.log('a constructor');
this.a = 'a';
function B() {;
console.log('b constructor');
this.b = 'b';
var b = new B();
// a constructor
// b constructor
b.a // 'a';
b.b // 'b';

This comment has been minimized.

Copy link
Owner Author

heapwolf commented Aug 6, 2012

var myEmitter = new MyClass();

myEmitter.on('myEventType', function(arg1, arg2) {
console.log(arg1, arg2);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.