[1] + [2] – [3] === 9!? Looking into assembly code of coercion.

Variable values have certain types. In fact, you can cast a value of one type to the other. If you do it explicitly, it is type casting (also called explicit coercion). If it happens in the background when you are trying to perform an operation on types that do not match, it is called coercion (sometimes referred to […]


Cookies: explaining document.cookie and the Set-Cookie header.

In the previous article, we’ve talked about WebStorage API that you can nowadays use to store data in the browser. LocalStorage and sessionStorage were introduced in the HTML5. Does that mean that before we could not save data on the client side? Not at all – we’ve had (and still have) cookies. How to use […]


Web Storage API: localStorage and sessionStorage

Web Storage API is used to store data in the browser and was introduced in HTML5. It brought us localStorage and sessionStorage. At the first glance, they seem similar. There are some important differences between them though, which is what we will talk about today. You will learn what their use-cases are and how to […]

JavaScript Webpack

Code splitting with SplitChunksPlugin in Webpack 4

Webpack 4 brought us some changes. Among things like faster bundling, it introduced SplitChunksPlugin, which made CommonsChunksPlugin obsolete. In this article, you will learn how to split your output code to improve the performance of our application. The idea of code splitting First things first: what exactly is code splitting in webpack? It allows you […]


Diving into functions. Passing by reference is a lie!

Functions are one of the most basic features of JavaScript. Have you ever wondered how exactly do they work? After all, they are just a special kind of objects. If you are curious, dig into them with me in this article! The basics of functions Speaking practically, a function is a subprogram that can be called […]


Keeping your dependencies in order when using NPM.

Mastering your tools as a developer is a very important thing. One of them is Node Package Manager – and quite a crucial one for a JavaScript developer. Having a better understanding how dependencies work will improve your workflow greatly and help to avoid many problems both for you and your fellow developers. Today we will cover […]

JavaScript Regex

Regex course – part three. Grouping and using ES6 features.

We covered quite a few features of regex so far. There is a lot more, though. Today we will deal with more advanced concepts, like groping and cover more of the RegExp object features in JavaScript. We will also learn how to use some of the features that ES6 brought us. Let’s go! exec It […]

JavaScript Regex

Regex course – part one. Basic concepts.

Regular expressions (regex) are sequences of characters defining a search pattern. Since it can be extremely useful in programmers everyday life, it was implemented into JavaScript. In this series of articles, I will show you how it works and what are its real-life usages. Hopefully, by the end of this part of the course, you […]


Demystifying generators. Implementing async/await.

Generators are a new feature introduced in ES6, and as I’ve promised in the article about async/await last week, we will cover them today. Iterators In JavaScript an iterator is an object that provides a next() method which returns the next item in the sequence. The first concept to understand here is the iterator. You might […]


Explaining async/await. Creating dummy promises.

Back in the days, we used callbacks. Then, we were blessed with promises. The journey does not stop there, though. ES7 introduced us to a new way of handling asynchronous calls: async/await. Feel free to read my other articles if you would like to know more about async in general, or callbacks and promises. The purpose […]