Need help! Plz! ;-(

Does anyone see anything wrong with this code??? :confused: Any help is appreciated!

function largestOfFour(arr, finalArr = []) {
  return !arr.length
    ? finalArr
    : largestOfFour(arr.slice(), finalArr.concat(Math.max(...arr[0])))

you just need to add 1 like that ====> arr.slice(1)

1 Like

@Mahmmmoud, thank you!!! It worked! I tend to make simple little mistakes. :grinning_face_with_smiling_eyes:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.