Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Javascript - find the largest

var array = [3, 5, 6, 9, 12,15, 14, 56, 7, 8, 65, 78];
var largest = array[0];
for( var i = 0; i <= array.length; i++){
    if(largest < array[i]){
        var largest = array[i];
    }
}
console.log(largest);
 
PREVIOUS NEXT
Tagged: #Javascript #find #largest
ADD COMMENT
Topic
Name
1+4 =