Gaurav's Blog

Embrace the "effects" running twice in ReactJS

As per the React documentation, whenever a component mounts for the first time, React will unmount and mount it again. In the beginning, it may seem like an odd behavior from React, but in the post we will explore why we should embrace it rather than consider it a bug.

May 29, 2022

3 minutes read

What Exactly is "this" Keyword in JavaScript

It is quite common for JavaScript developers to find this keyword to be confusing and understand it incorrectly. To get the expected results, developers make random guesses and do hit and trial. In this article, we'll discuss how JavaScript determines the value of this keyword

May 15, 2022

5 minutes read

All About Heap Data Structures

Heaps are a special type of complete binary tree which will always return the min/max element. We can make more efficient heaps with the heapify algorithm. Let's learn all about them in this article along with the code samples.

December 31, 2021

6 minutes read

What is an Execution Context in JavaScript?

The execution context is one of the very essential component of a JavaScript engine. The execution context is the environment in which the code is executed. In this article we will discuss the working of execution context in great details

December 26, 2021

4 minutes read

How JavaScript Array Works Internally?

Objects in JavaScript are responsible for holding the mapping between key-value pairs. Arrays are a type of object in JavaScript but with only numeric keys. Let us see how JavaScript engine optimizes these special objects with purely numeric keys

December 17, 2021

5 minutes read

Gaurav Thakur: How it all started?

Hi, my name is Gaurav Thakur. Currently, I'm doing my BTech in Computer Science from Lovely Professional University. I'll be graduating in the year 2022. In this article, I will share my wonderful journey in the field of programming.

December 05, 2021

5 minutes read

How Hoisting Works in JavaScript?

Hoisting in JavaScript is a phenomenon where we can access the variables and functions before they are initialized. Let's learn about hosting in JavaScript and how execution context plays an important role in Hoisting.

December 02, 2021

3 minutes read