Category: Fundamentals


Remove duplicates from the given array

Problem description : Write a function that removes duplicates entries from a given array. Input : An Array // [‘Heart5’, ‘Diamond6’, ‘Club7’, ‘Spade8’, ‘Diamond6’, ‘Club7’] Output : An Array // [‘Heart5’, ‘Diamond6’, ‘Club7’, ‘Spade8’]...


Calculate the average of a nested array

Problem description: The following nested array contains some invalid entries (which are not numbers). We also want to filter those entries in our average calculation. var nestedArray = [ 1, 2, 3, [4, 5,...


Multi dimensional arrays in javascript

Problem description : The following function creates a 2-D array and initialize it with zeros. Find a bug in the code and propse a solution to it. The following gist shows the given code...

Show Buttons
Hide Buttons