Given an array of values [1,2,0,-5,8,3], how can I get the maximum value in JavaScript?
I know I can write a loop and keep track of the maximum value, but am looking for a more code-efficient way of doing so with the JavaScript syntax.
Given an array of values [1,2,0,-5,8,3], how can I get the maximum value in JavaScript?
I know I can write a loop and keep track of the maximum value, but am looking for a more code-efficient way of doing so with the JavaScript syntax.