Category: ColinI

Understanding ES6 Modules

This article explores ES6 modules, showing how they can be used today with the help of a transpiler. Almost every language has a concept of modules — a way to include functionality declared in one file within another. Typically, a developer creates an encapsulated library of code responsible for handling related task...

ES6 in Action: let and const

In this tutorial, I’ll introduce let and const, two new keywords added to JavaScript with the arrival of ES6. They enhance JavaScript by providing a way to define block-scope variables and constants. This article is one of many covering new features of JavaScript introduced with ES6, including Map and WeakMap, Se...

ES6 in Action: New Array.* and Array.prototype.* Methods

In this article, we’ll discuss most of the new methods available in ES6 that work with the Array type, using Array.* and Array.prototype.*. When discussing them, I’ll write Array.method() when I describe a “class” method and Array.prototype.method() when I outline an “instance” method. We’ll also see some...

ES6 in Action: New String Methods — String.prototype.*

In my previous article on ES6 array methods, I introduced the new methods available in ECMAScript 6 that work with the Array type. In this tutorial, you’ll learn about new ES6 methods that work with strings: String.prototype.* We’ll develop several examples, and mention the polyfills available for them. Rem...

ES6 in Action: New Number Methods

This article covers new and improved number methods in ES6 (ECMAScript 6). It’s part of a series about the new features of ES6, in which we’ve also discussed new methods available for the String and Array data types, but also new types of data like Map and WeakMap. I’ll introduce you to the new methods and consta...