Javascript
JavaScript Collections - Set and Map
Introduction In this post we will get familiar with two different collections in JavaScript: Set Map In one of the next posts we will also talk about two similar collections: WeakSet WeakMap They were all introduced to JavaScript spec with ES2015, also known as ES6.
Organising JavaScript helpers
Introduction Since 2015 ECMAScript switched to yearly releases and they also switched to new naming format: ES_{Year}. With the arrival of ES6 or to be correct, ES 2015 we got support for classes in JavaScript. Also, we got new keywords: import and export. And this can make the code much cleaner and easier to work with.
Generators in JavaScript - Introduction
Introduction to generators A generator function is a special kind of function that was introduced in ES2015 (ES6). In JavaScript once we start a function it has to run to its completion. However, generator functions enable us to create functions that another code can reenter multiple times. Furthermore, nothing from outside of the generation function can make it exit/pause. Generator function pauses itself when it runs into a yield expression. Once a execution reaches yield expression, generator can not continue execution on its own. Something from outside has to continueits execution.
JavaScript Iterators
Introduction When we talk about iterators there are two main protocols to be aware of: iterables and iterators. Iterables are data structures that can be iterated. Such example is array, since we can loop through every element of array.
JavaScript Symbols
JavaScript Symbols - Introduction Symbol is a primitive data type in JavaScript. Symbols represent a way to define object keys that will never get in conflict with other keys. Since they are one of the primitive data types they are immutable.
Decorators with TypeScript
Introduction JavaScript decorators are a special kind of declaration. Decorators can be attached to both class declaration and class method declaration. Furthermore, they can be attached to accessor and property declaration. Finally, they can also be attached to parameter declaration.