JavaScript Regex

Regex course – part one. Basic concepts.

This entry is part 1 of 4 in the Regex course

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 […]


[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 […]


Scopes in JavaScript. Different types of variable declarations.

You can think of a scope as of a wrapper that contains all the variables and a reference to the parent scope. What does that mean and what should we watch out for when dealing with it? Let’s find out! How scopes work When we try to access a variable in our code, the interpreter […]


Prototype. The big bro behind ES6 class.

One of the great things that ES6 brought us are classes. We need to remember though, that all the work is done by prototypes under the hood. It means that ES6 classes act just as syntactic sugar. In this article, I will walk you through the basics of the prototypes, so that you can better grasp […]


Defining the undefined. A try/catch trick.

Undefined is one of the reasons for confusion and can get under the skin of a developer. But what is it exactly? Definition of undefined It is a value undefined value primitive value used when a variable has not been assigned a value Undefined is a special value that lets the programmer know that a variable […]


Priority of CSS declarations. A smart way to avoid !important

Have you ever taken a minute to consider how does a css parser handles the priority of all of the css declarations? This might be just the right moment! This knowledge will help you avoid many problems along the way, such as using the css !important rule. C stands for Cascading The first step in CSS […]