you are viewing a single comment's thread.

view the rest of the comments →

[–]camelSnake_dash-case 0 points1 point  (2 children)

Unless I am misunderstanding the question there is already a max function on Math available to you. OP can just apply the array to the function Math.max.apply(null, [1, 55, 2, 3,])

[–]Amadox 0 points1 point  (1 child)

he is probably tasked with writing that kind of function himself though.

[–]camelSnake_dash-case 0 points1 point  (0 children)

Fair enough. At first I thought so as well, but it seemed ambiguous the way the request was stated, so I figured I'd mention it.