Course · Section 11: Working With Arrays · Lecture 156: Data Transformations: map, filter, reduce
Implement `indexOfMax(nums)` returning the index of the first occurrence of the largest value in a non-empty array.
+ 1 hidden test run on Submit.
Scanning and updating only when strictly greater returns the index of the first maximum.
Run your code to see results.