Beginner5 min
Find the Maximum
Return the largest number in a nonempty array.
Your function
Implement solve(value, extra) in JavaScript. Return the answer; printing alone does not count as a result.
Examples
Input:
[[2,8,3]]Output:
8Input:
[[-5,-2,-9]]Output:
-2Constraints
Input contains at most 1,000 values or characters. Numbers are finite integers. Inputs follow the structure shown in the examples.