im trying to print the max number out of all the nested arrays but so far i only managed to get the max number out of each array individually
would love to get some help and insigth as to what i was doing wrong heres my code so far:
const arr = [
[1,2,3,10,9],
[4,5,6,8,7],
[7,8,9,6,5]
]
function matMax(){
for (const items of arr){
let max = 0;
for (const item of items){
if(items>max){
max = items
}
}
console.log(max)
}
}
matMax()```
i dont want to use math.max method