JavaScript Throttling and Debouncing Functions Explained: Optimize Your Code

12th January 2023

The idea to define the function is to call them only after some given time. The DOM events change rapidly, and calling them without any resistance can make function requests rapidly. Throttling and Debouncing are the methods for such ideas. Why Throt...Read more

Explaining the Key Differences Between Browser JavaScript and Node.js Event Loops

28th December 2022

Comparison in the big picture 🌄 There are a few key differences between the event loop in browser JavaScript and the event loop in Node.js: Execution environment: While the event loop in Node.js runs inside a separate JavaScript runtime, the event...Read more

Ways to get input from node js command line program.

22nd December 2022

Input from a command-line interface (CLI) application can be received in Node.js in a number of different ways. The following are a few of the most typical methods: 1. process.argv The arguments given from the command line to the Node.js process when...Read more

Count different values present in an array

10th November 2022

Method 1: If you know the values which are present in an array, and those known values are in another array for reference. If you got confused, let it go I am sharing an example now: Example: const knownVal = ['sun', 'earth', 'moon']; const countingA...Read more

How to extract query string in javascript?

9th November 2022

Take an example URL: "http:// www. abc . com/cityname/allison-burgers-sub-city-name/order" On the first go, we can see the strings are already divided by these slashes '/'. We can use to split function to split the URL where ever a slash is present....Read more