Check equality of two array in JavaScript
JavaScript provides several ways to check the equality of two arrays. However, depending on the type of elements in the arrays and the desired level of comparison, some methods may…
JavaScript provides several ways to check the equality of two arrays. However, depending on the type of elements in the arrays and the desired level of comparison, some methods may…
Angular Material disables style encapsulation for all components in the library. However, the default style encapsulation in your own components still prevents custom styles from leaking into Angular Material components.…
Let say we have an array of object which and object contain age and name. Now we want to find out youngest person and elder person. For these we have…
If we want to remove any key from a given object then we have the following method. 1. Using delete const obj = { a: 1, b: 2, c: 3,…
Many times we need to do Deep copying objects in JavaScript. Since shallow copy may cause many issues as it may affect original object. Here are few ways to achieve…
We can remove element from array with different ways. But if we want to remove specific element from array then we have to think different approach. 1. Using indexOf and…
These are few Javascript Ouput based interview question, which I faced during my interview process. Question 1. console.log('val1--val:',val1); val1 = 10; test(); var val2 = 20; const test = ()…
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…