JavaScript coding interview question
These are few coding interview question which I faced during my interview journey with different companies. I hope you will find helpful it. 1. Write a program for anagram. An…
These are few coding interview question which I faced during my interview journey with different companies. I hope you will find helpful it. 1. Write a program for anagram. An…
Some time we have a nested list which we want to make in one dimensional array or you can say we want to flat it. def flat(arr): #base condition if…
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.…
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…
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…
There may be a requirement to merge or flatten the array of array for better representation or readability. There are various ways to achieve this in javascript. We will try…
Sometime we need to get last element of array. Even when we do not know size of array. There are several way to achieve it. Lets explore few ways. 1.…
Problem statement: You have an array of number like [1,3,4,6,8] we need to find that these numbers are permutation of number or not, considering all numbers in an array. example:…