ES6: Generators

ES6: Generators

A generator is a function that can be entered and exited multiple times. Its context gets saved across re-entrances allowing to control the iterator and hence create iterations through custom objects. This is unlikely to make much sense at this…

ES6: Promises

ES6: Promises

Promises have been around for a while but with ES6 also came its native implementation which we will now have a look at. So what is a promise anyway? As defined by MDN, the Promise object represents the eventual completion…

ES6: Arrow Functions

ES6: Arrow Functions

In today's post I will talk about fat-arrow functions introduced in ES6. Why is it called fat-arrow function you wonder? As it turns out, => is called fat-arrow in contrast to -> for example which, I guess, should be…

ES6: Enhanced Object Literals

ES6: Enhanced Object Literals

If you have written some JavaScript code, most likely you are already familiar with object literals which make it easy to create objects with key: value pairs. ES6 syntax enhances object literals in a few interesting ways, let's look at…

ES6: Classes

ES6: Classes

In today's overview of ES6 let's have a look at classes. Classes essentially is just a syntactical sugar over the existing JavaScript's prototype-based inheritance. As MDN clearly states, the class syntax does not introduce a new object-oriented inheritance model to…