⭐ What is OOPs ? Object-oriented programming is an approach to solving problems by creating objects . ⭐ 4 Pillars of OOP Terminologies in OOP Abstraction – Hiding internal details (show only essential info!) Encapsulation – The act of putting various components together (in a capsule) Inheritance – The act of deriving new things from existing things Polymorphism –… Continue reading OOPS in JS
Category: JavaScript
How to Use express-rate-limiter to Limit User Rates in Node.js
In modern web applications, it is very common to have user authentication and authorization systems. These systems provide user-specific functionality and data, which requires that each user has a certain level of access and control over the resources they own. However, when these resources are accessed in a rapid and repetitive manner, it can lead… Continue reading How to Use express-rate-limiter to Limit User Rates in Node.js
Building a Search Engine Using Node.js and Elasticsearch
Search engines are an essential part of today’s web applications. They help users find relevant content quickly and easily. Elasticsearch is a popular open-source search and analytics engine that can be used to build powerful search engines. In this blog post, we will explore how to build a search engine using Node.js and Elasticsearch. Prerequisites… Continue reading Building a Search Engine Using Node.js and Elasticsearch
✨ Mastering JavaScript Event Delegation: An In-depth Guide!
🚀 When working with JavaScript, handling events efficiently can make a huge difference in terms of the performance and maintainability of your code. One powerful yet often overlooked technique is event delegation. In this blog post, we’ll explore what event delegation is, why it’s awesome, and how you can use it to optimize your event handling in… Continue reading ✨ Mastering JavaScript Event Delegation: An In-depth Guide!
Event Loop
What is the Event Loop? The Event Loop is a mechanism in JavaScript that allows the runtime to handle asynchronous operations. It ensures that JavaScript remains responsive and non-blocking by managing the execution of multiple tasks in a single-threaded environment. How Does the Event Loop Work? Single Threaded Execution: JavaScript is single-threaded, meaning it can only execute… Continue reading Event Loop
Mastering JavaScript’s Event Loop and Concurrency: A Deep Dive
JavaScript is known for its single-threaded, non-blocking, asynchronous nature. This often raises questions like, “How can JavaScript handle multiple tasks at once if it’s single-threaded?” The answer lies in its powerful Event Loop. Understanding the Event Loop is crucial for mastering asynchronous operations and writing efficient, non-blocking code. In this article, we’ll explore the Event Loop in depth, demystify its… Continue reading Mastering JavaScript’s Event Loop and Concurrency: A Deep Dive
Hash Map using Javascript
Introduction A Hash Map, also known as a Hash Table, is a data structure that implements an associative array abstract data type, a structure that can map keys to values. It uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found. The… Continue reading Hash Map using Javascript
What the heck are CJS, AMD, UMD, and ESM in Javascript?
In the beginning, Javascript did not have a way to import/export modules. This is a problem. Imagine writing your app in just one file – it would be nightmarish! Then, people much, much smarter than me attempted to add modularity to Javascript. Some of them are CJS, AMD, UMD, and ESM. You may have heard some… Continue reading What the heck are CJS, AMD, UMD, and ESM in Javascript?
Next.js and Payload: A Powerful Combination
Next.js and Payload are two powerful tools that can be used together to build modern, efficient, and scalable web applications. Next.js Next.js is a React framework that simplifies the development of web applications. It offers features like: Server-Side Rendering (SSR): Improves SEO and initial page load performance. Static Site Generation (SSG): Optimizes website speed and… Continue reading Next.js and Payload: A Powerful Combination
A surprising JavaScript memory leak
JavaScript is secretly a functional programming language, and its functions are closures: function objects get access to variables defined in their enclosing scope, even when that scope is finished. Local variables which are captured by a closure are garbage collected once the function they are defined in has finished and all functions defined inside their scope are themselves… Continue reading A surprising JavaScript memory leak