When I use new to instainciate an instance of a certain class, I got the actual instance. When the constructor function has a return value, the new sen
new
The Javascript constructor does not need a return. This will work:-
function foo() { this.x = 1; } var myfoo = new foo(); console.log(myfoo.x);