|
Am I the only one just googling for this stuff because it's way faster? like, "maximum value in array" gives: var max = arr.reduce(function(a, b) {
return Math.max(a, b);
}); which is totally valid for javascript and also pretty neat. I would probably do some funny things with loops instead, wasting time and resources. |