Languages
[Edit]
EN

JavaScript - how to find min value in array with Array reduce method?

7 points
Created by:
JustMike
29670

Using JavaScript it is possible to find minimum value in array in following way.

1. Array reduce method example

// ONLINE-RUNNER:browser;

var array = [1, 2, 3];

var result = array.reduce(function(a, b) {
    return Math.min(a, b);
});

console.log(result);

See also

  1. JavaScript - Math.min() method example
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join