Skip to content

Latest commit

 

History

History
16 lines (14 loc) · 677 Bytes

check-subarray-total.md

File metadata and controls

16 lines (14 loc) · 677 Bytes

Given a nested array of numbers write a function that returns true if the sum of the numbers in any of the subarray is greater than 100. The function returns false if there is no subarray having a sum of its numbers greater than 100.

CODE TEMPLATE


function checkSubArrayTotal(numbers){
// write your code here
}
console.log(checkSubArrayTotal([[10,25,35],[10,62,85,2],[15]]));// true
console.log(checkSubArrayTotal([[10,25,35],[10,62,8,5],[15,15,26,14,15,12]]));// false
console.log(checkSubArrayTotal([[10,25,35],[],[10,62,8,5],[15,90]]));// true
console.log(checkSubArrayTotal([[],[],[],[]]));// false