Different way to reverse string in JavaScript
There are various way to reverse the string in javascript. Let try few ways to achieve same. 1. Using inbuilt methods let str = 'singhak'; let strArray = str.split(''); let…
There are various way to reverse the string in javascript. Let try few ways to achieve same. 1. Using inbuilt methods let str = 'singhak'; let strArray = str.split(''); let…
In many scenario we want to convert our xls sheet to json to process the data. Here we are going to do this with the help on one node module…
We need to perform some operation on array elements within async and await function. But using forEach loop is a bad choice. We achieve same with the following approach. 1.…
The == operator will compare for equality after doing any necessary type conversions. The === operator will not do the conversion, so if two values are not the same type === will simply return false. Both are equally quick. For…
This means that a promise you called rejected, but there was no catch used to handle the error. Add a catch after the offending then to handle this properly. The origin of this error lies in…
In this post, we will learn various methods to remove duplicates from an array using JavaScript methods. 1. Using Set: As we know that a Set is a collection of…
Decimal to Binary: /* Convert 13 to binary: Division by 2 Quotient Remainder Bit # ---------------------------------------- 13/2 6 1 0 6/2 3 0 1 3/2 1 1 2 1/2 0…
Debouncing and throttling are techniques in JavaScript to optimize the application and browser performance. These are programming concept not provided by JavaScript directly. Debouncing & Throttling Debouncing: Debouncing is the…