Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

apply() js

The apply() method accepts arguments in an array:

var arr = [6, 89, 3, 45];
var maximus = Math.max.apply(null, arr); // returns 89
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #js
ADD COMMENT
Topic
Name
4+1 =