ES6 Sets and Maps

es6 sets and maps

ES6 includes two data structures which help programmers get work done without reinventing the wheel. These two data structures are those of Sets and Maps. A Set can be thought of as a collection of elements which are both unordered, and unique. That is the key to remember. The purpose of a Set is to guarantee the uniqueness of it’s items. A particular element is a member of the set, if the set contains the element.…

9 New Array Functions in ES6

new array functions in es6

There are many new extensions to the array object in ES6. In this journey of learning the foo of ES6, we will set our targets on mastering the ways of new functions like Array.of(), Array.from(), Array.fill(), Array.find(), Array.findIndex(), Array.copyWithin(), Array.entries(), Array.keys(), and Array.values(). These new functions make it easier to fill up arrays, or find data within them. In addition to that it is now easier to work with specific keys and values in the array itself.…

ES6 Generators

es6 generators

Generators in ES6 are a special kind of function that return an iterator. They are quite a bit different than your standard run of the mill function in JavaScript however. Generators can pause themselves as they are running, and return multiple values as execution pauses and resumes. You use an iterator to call a generator multiple times. Let’s look at some examples to better understand how generators work.…

Iterators In ES6

iterators in es6

Iterators are a major new feature in ES6, and are used extensively already. Iterators are used for lazy evaluation, or in cases where describing an infinite sequence is needed. Soon we will be looking at Generators, and it helps to have a grasp of iterators before we do so. In fact, Iterators are kind of a prerequisite for Generators, Promises, Sets, and Maps. Let’s look at the basics of Iterators here, and get up to speed with them.…

ES6 Promises Tutorial

es6 promises

Modern programming languages have a jargon all to themselves. We are inundated with acronyms and foreign sounding words every day. Today, we’ll be taking about Promises. If you make use of our good friend Webster, you’ll find something along the lines of this for the meaning of a promise: A declaration or assurance that one will do a particular thing or that a particular thing will happen.