JavaScript

Concatenating strings with template literals. Tagged templates

In this article, we cover ways to join strings. Even though it includes old methods of concatenating strings, we focus on template literals. Here you can learn how they work and how to expand their functionality with tags. Let’s go! Before template literals Back in the days, we didn’t have template literals and to merge […]

JavaScript

Explaining the JavaScript array. Sparse and dense arrays.

The array is a popular concept across many programming languages. At first glance, arrays work in the same way, but the JavaScript array differs from languages like C++. The article explains the basics of how JavaScript arrays work under the hood. It includes what are indexes and what is a maximum size of an array. Aside […]

JavaScript

Fundamentals of storing data in the browser with IndexedDB

IndexedDB is another API meant for client-side storage. It is good for storing a significant amount of data, including files. IndexedDB is more suitable than WebStorage for keeping structured data, and definitely more adequate for that than cookies. In this article, we go through the main concepts of IndexedDB. Basic concepts of IndexedDB IndexedDB is object-oriented […]

JavaScript

Object property descriptors. Getters and setters

With the properties of objects, you can set more than just their values. In this article, you can learn what is the property descriptor and what you can achieve with it. Among other things, you can use getters and setters and the article also explains their concepts. Property descriptor A descriptor is a structure that holds information […]

Uncategorized

Introduction to WebSockets. Creating a Node.js server and using WebSocket API in the browser

WebSocket is a protocol that makes two-way communication in real-time between the user and the server possible. A common use cases are chats and online multiplayer games. Today we cover implementing it both on frontend and backend. Let’s go! Explaining WebSockets WebSocket is a different protocol than HTTP. Despite that, to establish a connection, the client sends […]

JavaScript Testing

JavaScript testing #2. Introducing Enzyme and testing React components

This entry is part 2 of 18 in the JavaScript testing tutorial

At the previous part of the tutorial, we’ve briefly covered the basics of unit testing. This time we will go further and start testing React with the Enzyme library. Thanks to the that, your application will be more reliable and it will be easier to avoid regression. Even though we will be using Jest here, Enzyme also works […]

JavaScript Testing

JavaScript testing #1. Explaining types of tests. Basics of unit testing with Jest

This entry is part 1 of 18 in the JavaScript testing tutorial

Hello! Today we start another big series, which is about JavaScript testing. There are various different types of tests and we will start by explaining some of them. In the beginning, we will cover the basics of unit testing, which is testing individual parts of our application and checking if they are fit to use. To […]