Contributions

Tutorial
Call it a wait, sleep, or delay in executing code in JavaScript. It can be done in multiple ways in JavaScript on the browser and Node.js. In this post, you will learn how to wait for 1 (or x) second in Javascript using setTimeout, promise, and Delay NPM package with a working code example. Let’s get started!
Tutorial
In this post, you will learn about how to use Jest’s spyOn method to peek into calls of some methods and optionally replace the method with a custom implementation. You will also learn how to return values from a spy and evaluate the parameters passed into it with a practical React code example.
Tutorial
Jest has been the tool of choice for writing tests in JavaScript for years now. This guide will teach you how to run a single test using Jest. Let’s get going!
Tutorial
Jest is the most used JavaScript testing framework. In this post, you will learn how to use Jest toHaveBeenCalledWith for testing various scenarios like a partial array, partial object, multiple calls, etc. Let’s get started!
Article
Learn how to return multiple values from a function call in Javascript. Unlike go lang, JavaScript does not have a native way to return multiple values from a single function. In this post, you will learn how to improvise on this and get around the issue if you have to get back multiple values from a JavaScript function call. Time to get going.
Tutorial
Async execution and promises are not easy to understand in any language and JavaScript is no exception. In this post, we will dissect how JavaScript Promise.all function works visually and with a real-life code example, let’s get started!
Article
JavaScript Sets are a new type of object (with ES6) that allows creating a collection of unique values. The values stored in a set can either be primitives like strings or integers or more complex types like arrays or objects. In this post, we will look into how to use Sets from a beginner’s point of view, let’s get started!
Tutorial
Feature flags in any language significantly reduce the blast radius of a release if anything goes wrong. Javascript feature flags are no exception. In this post, you will learn how to use javascript feature flags in a React.js application to deploy a small feature safely to your users. Let’s get started!
Article
Use these 10 nifty JavaScript array functions to get your job done easily and efficiently. Some of them include map, filter, some, find, and sort. Read more about these handy methods.