Nikitasha Shrivastava has Published 195 Articles

Validating a power JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 19:34:49

96 Views

In this problem we have to validate that a given number is a power of n. If the given number is power of n then it should return the true value of it otherwise it should return false. To check this kind of validation we generally use arithmetic ... Read More

Unique sort (removing duplicates and sorting an array) in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 19:32:47

3K+ Views

As the problem stated, create a program for a unique sort in javascript. Basically we have to remove duplicate elements from an array. Understand the problem In this problem statement we need to eliminate the same or duplicated item from an array. For solving this kind of ... Read More

Split array entries to form object in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 19:30:35

255 Views

The problem statement is saying that we have to find a solution for a given array and split it to form an object with a key-value pair in javascript. Understand the problem In simple terms we have to convert a given array into an object. There are ... Read More

Sort the array and group all the identical (duplicate) numbers into their separate subarray in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 19:27:43

1K+ Views

In this problem, we have to group all the duplicate data in the array by making their subarray. After making the subarray we have to arrange them in a sorted order. This problem can be solved by searching techniques of data structures. Understanding the Problem So for ... Read More

Sort Array of objects by two properties in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 19:24:35

2K+ Views

Given problem says to sort the given array of objects by two properties and create a program in javascript. Understanding the problem Let's have a deep understanding of the problem statement. You will be given an array of objects with key and value. As per the problem statement ... Read More

Merging sorted arrays together JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 19:22:23

323 Views

Merging the sorted arrays together in javascript can be done using the sorting techniques available in data structures. In this problem we will be given two sorted arrays and we have to merge them. After merging them, return a single array which is also in a sorted form. ... Read More

Merge duplicate and increase count for each object in array in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 19:09:39

1K+ Views

The problem statement says to merge duplicate elements and increase the count for every object present in the array and implement this program in javascript. Understanding the Problem To start coding we need to understand the basic functionality of the javascript functions. Predefined functions in JavaScript will complete ... Read More

Merge and group object properties in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 19:06:32

479 Views

In the given problem, we have to merge and group object properties with the help of javascript. In this article you will learn how to merge and group the same type of properties in javascript. Understanding the Problem We are required to create a javascript method that will ... Read More

How to sort an array of objects based on the length of a nested array in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 18:59:58

2K+ Views

This problem statement is saying to sort an array of objects based on the length of the nested arrays in it. For example if the first nested array has 3 elements and the second array has 2 elements then put the second array in first place and the first array ... Read More

How to get single array from multiple arrays in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 18-Aug-2023 18:56:17

3K+ Views

In this problem we will understand how to get a single array from multiple arrays and different ways to solve this problem. We will use three methods to solve this problem: the first method is with the help of the spread operator, second concat method and finally last ... Read More

Previous 1 ... 6 7 8 9 10 ... 20 Next
Advertisements