Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

max element in array

int max;
max=INT_MIN;

for(int i=0;i<ar.length();i++){
	if(ar[i]>max){
    	max=ar[i];
    }

       
Source by www.smashingmagazine.com #
 
PREVIOUS NEXT
Tagged: #max #element #array
ADD COMMENT
Topic
Name
8+6 =