-4
rated 0 times
[
1]
[
5]
/ answers: 1 / hits: 30915
/ 9 Years ago, fri, november 6, 2015, 12:00:00
If you have an array containing an indefinite amount of arrays
ex:
var masterArray = [ [1,2,3,4,5],
[1,2],
[1,1,1,1,2,2,2,2,4,4],
[1,2,3,4,5] ];
What is an efficient way to find the index of the longest array in masterArray? (in this example index would be 2).
More From » arrays