Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js max with array

var myArray = [5, 10, 50];
Math.max(myArray);    // Error: NaN
Math.max.apply(Math, myArray);    // 50
Source by www.smashingmagazine.com #
 
PREVIOUS NEXT
Tagged: #js #max #array
ADD COMMENT
Topic
Name
9+8 =