How does the new operator work in JavaScript?

Viewed 8318

Probably the least understood part of JavaScript, standing beside the prototype chain.

So the question is: how does...

new dataObj(args); 

...actually create an object, and define its prototype chain/constructors/etc?

Best is to show an alternative, to fully understand this keyword.

2 Answers
Related