Nikitasha Shrivastava has Published 196 Articles

Get value for key from nested JSON object in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 23-Aug-2023 12:42:59

12K+ Views

In the given problem statement we are asked to get value for key from nested JSON object with the help of javascript functionalities. In Javascript we can solve and access the json data object with the help of dot notation or bracket notation. Before starting coding for the given ... Read More

Function to decode a string in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 23-Aug-2023 12:40:51

722 Views

In the given problem statement we are asked to implement a function to decode a string with the help of javascript functionalities. To solve these kinds of problems we can use built−in functions of Javascript. These functions usually take encoded data as input and give output as decoded strings. What ... Read More

Fibonacci like sequence in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 23-Aug-2023 12:37:52

251 Views

In the given problem statement we are asked to create a fibonacci like sequence with the help of javascript functionalities. In the Javascript we can solve this problem with the help of recursion or using a for loop. What is the Fibonacci Sequence ? Let's understand the working of ... Read More

Finding all possible combinations from an array in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 23-Aug-2023 12:34:26

814 Views

In the given problem statement we are asked to find all the possible combinations from an array with the help of javascript functionalities. So for this we will be working with an empty array and add all the possible combinations into this array. Logic for The Above Problem The easiest ... Read More

Determining whether numbers form additive sequence in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 23-Aug-2023 10:47:39

203 Views

This problem says to determine if the given numbers in the array are in the form of additive sequence or not. We will check, If any two adjacent numbers in a sequence add up to the next number in the sequence, we can confirm this using a straightforward procedure. Understanding ... Read More

JavaScript group a JSON Object by Two Properties and Count

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 22-Aug-2023 20:38:16

2K+ Views

The problem stated that we have to add two properties of the JSON object and count its occurrences. For example we have name and age properties in JSON then group them in a single property and count their occurrences. What is JSON ? JSON (Javascript Object Notation) ... Read More

Convert object to array of objects in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 22-Aug-2023 15:49:17

421 Views

In the given problem statement we are required to convert an object to an array of objects with the help of javascript functionalities. To perform conversion of an object into an array of objects we can use Javascript’s built−in methods. What is an Array in Javascript ? An array is ... Read More

Convert number to characters in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 22-Aug-2023 14:24:43

3K+ Views

In the given problem statement we are asked to convert numbers to characters with the help of javascript functionalities. In Javascript we have some built−in functions to convert a number to its corresponding characters and also with user defined functions we can convert it. Logic for The Above Problem As ... Read More

Check if items in an array are consecutive but WITHOUT SORTING in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 22-Aug-2023 14:21:54

533 Views

In the above statement we are asked to check if items in an array are consecutive without sorting the array with the help of javascript functionalities. We can solve this problem with some basic functionalities of javascript. Let us see how to do this! What are Consecutive Items in ... Read More

Calculating the average for each subarray separately and then return the sum of all the averages in JavaScript

Nikitasha Shrivastava

Nikitasha Shrivastava

Updated on 22-Aug-2023 14:16:44

136 Views

In the given problem statement we are asked to calculate the average for each subarray separately and then return the sum of all the averages with the help of javascript functionalities. As we talk about average for subarrays we can use the reduce method of javascript. What is the reduce() ... Read More

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