Loop over an array with the given timeout for each element
Problem You are given an array of objects each with its name and timeout value. Iterate over each element inside an array in the interval of the given timeout. Solution We have to set...
Problem You are given an array of objects each with its name and timeout value. Iterate over each element inside an array in the interval of the given timeout. Solution We have to set...
Problem : Given a JSON data structure with key representing age and value representing the number of people with that age. For example, { 25: 55, 26: 45, 27: 10, 28: 20, 30: 1,...
Problem : Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a letter in pattern and...
Problem description : Write a function which transforms the given JSON as shown belows : Input : Given an endorsment array with objects containing skill and user keys var endorsements = [ { skill:...
Input : An Object Output : An Object Logic : Use JSON.stringify() to convert the given object into a string. Use JSON.parse() to convert the given string into a new Object. Solution :