Tagged: Arrays


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...