Category: constructor functions

JavaScript Object Creation: Patterns and Best Practices

In this article, I’m going to take you on a tour of the various styles of JavaScript object creation, and how each builds on the others in incremental steps. JavaScript has a multitude of styles for creating objects, and newcomers and veterans alike can feel overwhelmed by the choices and unsure which they should use...