Different ways to remove duplicates from array javascript
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…
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…
Pure functions are the atomic building blocks in functional programming. They are adored for their simplicity and testability. A pure function is a deterministic function. This means when a same input…
Some time it is difficult to handle all error or exceptions. Even then we need to capture these error or exception for debug purpose or to show proper message to…
If we have array of object and we want to find unique object from the array then it become tedious if we are not using/want any external library. Let try…
The JavaScript has substring() method returns the part of the string between the start and end indexes, or to the end of the string. But slice() also another way to get substring from…
We can execute external command or any process from the node js. With the help of child_process module we can achieve it. 1. var spawn = require('child_process').spawn, ls = spawn('cmd.exe',…