Archive for the ‘ES6 classes’ Category

Patterns for Object Inheritance in JavaScript ES2015

Posted on: No Comments
With the long-awaited arrival of ES2015 (formerly known as ES6), JavaScript is equipped with syntax specifically to define classes. In this article, I’m going to explore if we can leverage the class syntax to compose classes out of smaller parts. Kee...

JavaScript Design Patterns: The Singleton

Among languages used in widespread production, JavaScript is by far the most quickly evolving, looking less like its earliest iterations and more like Python with every new spec put forth by ECMA International. While the changes have their fair share o...

JavaScript Object Creation: Patterns and Best Practices

This article was peer reviewed by Tim Severien. Thanks to all of SitePoint's peer reviewers for making SitePoint content the best it can be! [author_more] JavaScript has a multitude of styles for creating objects, and newcomers and veterans alike can f...

Quick Tip: Master Closures by Reimplementing Them from Scratch

Posted on: No Comments
This article was peer reviewed by Tim Severien and Michaela Lehr. Thanks to all of SitePoint's peer reviewers for making SitePoint content the best it can be! To say there are a lot of articles about closures would be an understatement. Most will expla...