Use:
var arr = [1, 2, 3, 4];
var largest = arr.reduce(function(x,y) {
return (x > y) ? x : y;
});
console.log(largest);
Use:
var arr = [1, 2, 3, 4];
var largest = arr.reduce(function(x,y) {
return (x > y) ? x : y;
});
console.log(largest);
For further actions, you may consider blocking this person and/or reporting abuse
Will T. -
Victoria -
GrahamTheDev -
Pushpa Raj Dangi -
Oldest comments (0)