Find the Maximum

Arrays ยท easy

Implement `findMax(arr)` that returns the largest number in `arr`. You may assume `arr` is non-empty.

Hints
  • Spread the array into Math.max.

Learning resources

Loading...

Run your code to see results.