Category: JavaScript


  • What is IIFE? An Immediately Invoked Function Expression (IIFE) is a JavaScript design pattern where a function is defined and executed immediately after it’s declared. It’s typically wrapped within parentheses to denote a function expression and followed by an additional pair of parentheses to invoke it immediately. Function Expression In JavaScript, we treat functions as…

  • Callbacks & Callback Hell

    Synchronous & Asynchronous Code Synchronous code – Synchronous code is executed line by line in the order it appears in the program. Each statement waits for the previous one to complete before executing. This means that if there’s a time-consuming task or an I/O operation, the whole program or function will be blocked until that…

  • var, let & const in Javascript

    var even though console.log(x) appears before the declaration var x = 5 it doesn’t result in an error. During the compilation phase, the declaration var x is hoisted to the top, making the variable x accessible throughout its scope. However, only the declaration is hoisted, not the initialization, so the first console.log(x) outputs undefined. The…

  • Hoisting in JavaScript

    What is Hoisting? In JavaScript, hoisting is a behaviour where variable and function declarations are lifted to the top of their respective scopes during the compilation phase. This ensures that, no matter where you declare variables and functions in your code, they are effectively moved to the top of their scopes before the actual code…

  • JavaScript is a versatile and powerful programming language used for building dynamic web applications. One of its key features is asynchronous programming, which allows us to perform tasks concurrently without blocking the main execution thread. Let’s explore a fundamental method for managing asynchronous operations in JavaScript called Promise.race(). We’ll break it down into easy-to-understand concepts…

  • As React developers, we’re constantly seeking ways to optimize our applications, and one powerful technique at our disposal is dynamic imports. Here, we’ll dive into the world of dynamic imports in React and explore how they can help us achieve faster load times and more efficient code splitting. Understanding Code Splitting Before we delve into…

  • JavaScript has come a long way since its inception, and with ES2023, the 14th and current version, it’s about to get even better. Packed with a plethora of new features and enhancements, ES2023 aims to elevate your JavaScript development experience to new heights.