javascript : Array .max
javascript : Array .max
Target:
Applicable with Array Data Type.
Description :
It traverse array and return maximum value.
Note: If array is empty then return undefined .
Syntax:
[] .max
Usase:
- [1,2,3,4,5,2,8,3,1].max
It return 8 - ['a','b','x','z','c'].max
It return 'z'
Download MYJS.js
MyJs is a collection of java script extension methods that enhances the JavaScript objects, class object, DOM element, domElementsCollections, Date, String, Number and other data type.
Include in you project landing page (master page) and it will extends your DOM and JavaScript Objects.
Comments
Post a Comment