Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

largest element in nested array

function largestOfFour(arr) {
  return arr.map(function(group) {
    return group.reduce(function(prev, current) {
      return current > prev ? current : prev;
    });
  });
}
Source by forum.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #largest #element #nested #array
ADD COMMENT
Topic
Name
8+8 =