function arrSum(array) {
let sum = 0
function recur (array){
if (Array.isArray(array)) {
array.map(val => {
if(Array.isArray(val)) {
recur(val)
} else {
sum += val
}
})
}
}
recur(array)
return sum
}
let arr = [[1, [4,6]], [3, 4], [5, 6]]
let totalSum = arrSum(arr) \\ => 29