← Back to challenges

Find the Highest Integer in the Array Using Recursion

JavaScriptHardrecursionnumbersdata_structures

Instructions

Create a function that finds the highest integer in the array using recursion.

Examples

findHighest([-1, 3, 5, 6, 99, 12, 2]) ➞ 99

findHighest([0, 12, 4, 87]) ➞ 87

findHighest([6,7,8]) ➞ 8

Notes

Please use the recursion to solve this (not the max() method).

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Emphasise the Words