Understanding the JavaScript new keyword