Returns the maximum value in a sequence of numbers.

const result = max([1, 2, 3]);
console.log(result); // 3
  • Parameters

    • iterable: Iterable<number>

    Returns undefined | number

    Maximum value in the sequence.