This New Binding

by Rich Costello

JavaScript

function foo(a) {
		this.a = a;
}

var bar = new foo(2);
console.log(bar.a);