X263: Recursion Programming Exercise: Largest
Write the missing base case for function largest
. Function
largest
should find the largest number in array
numbers
. When largest
is first called, index
will
equal numbers.length-1
.
Examples:
largest({2, 4, 8}, 2) -> 8
Your Answer:
Feedback
Your feedback will appear here when you check your answer.