Must know details about ES2016 features

Good news, in June 2016 ECMAScript 2016 was approved. It contains the features that passed the stage 4, which means finished, of the TC39 process: The array method includes() The exponentiation operator base ** exponent This edition is smaller than ECMAScript 2015, but it doesn't mean less important. Still it has details that you should know before using the new features. The new method array.includes(… Continue reading

Power up the array creation in JavaScript

The array is an ordered collection of objects or primitive types. It's hard to imagine an application that doesn't use this data structure. Working with arrays consists in the following phases: Initialize the array and setup the initial elements Access the array elements by index Add new elements Remove existing elements The current article covers the array initialization and setting the initial elements. The basic… Continue reading

The magic behind array length property

Developer deals with arrays every day. Being a collection, an important property to query is the number of items: Array.prototype.length. In JavaScript the length does not always indicate the number of existing elements (for sparse arrays) and modifying this property may remove elements. Let's demystify the magic behind this property. Definition The length of an array is an unsigned, 32-bit integer that is… Continue reading