How about augmenting the built-in Array object to use Math.max/Math.min instead:

Array.prototype.max = function() {
  return Math.max.apply(null, this);
};

Array.prototype.min = function() {
  return Math.min.apply(null, this);
};

let p = [35,2,65,7,8,9,12,121,33,99];

console.log(`Max value is: ${p.max()}` +
  `\nMin value is: ${p.min()}`);

Here is a JSFiddle.

Augmenting the built-ins can cause collisions with other libraries (some see), so you may be more comfortable with just apply'ing Math.xxx() to your array directly:

var min = Math.min.apply(null, arr),
    max = Math.max.apply(null, arr);

Alternately, assuming your browser supports ECMAScript 6, you can use spread syntax which functions similarly to the apply method:

var min = Math.min( ...arr ),
    max = Math.max( ...arr );
Answer from Roatin Marth on Stack Overflow
🌐
JavaScript in Plain English
javascript.plainenglish.io › how-to-get-min-or-max-of-an-array-in-javascript-and-typescript-ed1087c080cf
How To Get Min Or Max Of An Array In JavaScript And TypeScript | by Sam C. Tomasi | JavaScript in Plain English
April 23, 2024 - This is my solution for TypeScript: export class Kata { static highAndLow(numbers: string): string { const arr: number[] = numbers.split(" ").map((c) => parseInt(c)); const max: number = Math.max(...arr); const min: number = Math.min(...arr)… · Follow · 175K followers ·
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Math › min
Math.min() - JavaScript | MDN
console.log(Math.min(2, 3, 1)); // Expected output: 1 console.log(Math.min(-2, -3, -1)); // Expected output: -3 const array = [2, 3, 1]; console.log(Math.min(...array)); // Expected output: 1
🌐
Java Guides
javaguides.net › 2025 › 01 › typescript-math-min.html
TypeScript Math min()
January 4, 2025 - In this example, we use Math.min() to find the smallest value in an array using the spread syntax.
🌐
DEV Community
dev.to › nickraphael › getting-the-min-or-max-value-from-an-array-of-numbers-in-javascript-307n
Getting the min or max value from an array of numbers in javascript - DEV Community
March 29, 2020 - Let's suppose we have an array of number... var myNumbers = [100, 50, 200]; We can use swanky destructuring assignment, which I know more commonly as the spread operator. var myNumbers = [100, 50, 200]; var myMinNumber = Math.min(...myNumbers); ...
🌐
GitHub
github.com › Microsoft › TypeScript › issues › 30924
Type Math.min & Math.max using generic · Issue #30924 · microsoft/TypeScript
April 14, 2019 - Search Terms Math.min generic Math.max generic Suggestion Currently, Math.min is typed as: min(...values: number[]): number; However, I would like to change the definition to: min (...values: [T, ...T[]]): T; min(): numb...
Published   Apr 14, 2019
Find elsewhere
🌐
xjavascript
xjavascript.com › blog › typescript-math-min
Mastering `Math.min` in TypeScript — xjavascript.com
We pass these numbers to Math.min, ... If you have an array of numbers, you can use the spread operator (...) to pass the elements of the array as individual arguments to Math.min....
🌐
Java Guides
javaguides.net › 2023 › 09 › typescript-find-minimum-element-in-array.html
TypeScript: Find the Minimum Element in an Array
September 9, 2023 - Therefore, when the loop concludes, minNumber embodies the smallest value within the array. ... 7. For verification, we evaluate our function using an exemplar array of numbers, subsequently presenting the array and its smallest element. ... TypeScript: Subtract Two Numbers TypeScript: Add Two Numbers TypeScript: Multiply Two Numbers TypeScript: Divide Two Numbers TypeScript: Find the Remainder of Two Numbers TypeScript: Check if a Number is Odd or Even TypeScript: Find the Maximum of Three Numbers TypeScript: Calculate the Area of a Circle TypeScript: Calculate the Area of a Triangle TypeScri
🌐
W3Schools
w3schools.com › jsref › jsref_min.asp
JavaScript Math min() Method
The Math.min() method returns the number with the lowest value.
🌐
Reddit
reddit.com › r/javascript › why don't math.max and math.min accept arrays? why are they n-arity functions?
r/javascript on Reddit: Why don't Math.max and Math.min accept arrays? Why are they n-arity functions?
February 13, 2017 -

Edit: I am not asking for a way to use these methods with arrays. What I am asking is why in the first place do they not accept arrays.

However, I will list the solutions mentioned:

  1. Math.max.apply(null, arr)

  2. Math.max(...arr)

  3. arr.reduce((max, current) => (current > max ? current : max), -Infinity);

🌐
Math.js
mathjs.org › docs › reference › functions › min.html
math.js
math.min(2, 1, 4, 3) // returns 1 math.min([2, 1, 4, 3]) // returns 1 // minimum over a specified dimension (zero-based) math.min([[2, 5], [4, 3], [1, 7]], 0) // returns [1, 3] math.min([[2, 5], [4, 3], [1, 7]], 1) // returns [2, 3, 1] math.max(2.7, 7.1, -4.5, 2.0, 4.1) // returns 7.1 math.min(2.7, 7.1, -4.5, 2.0, 4.1) // returns -4.5
🌐
Medium
medium.com › @vladbezden › how-to-get-min-or-max-of-an-array-in-javascript-1c264ec6e1aa
How to get min or max of an array in JavaScript | by Vlad Bezden | Medium
September 2, 2016 - var nums = [1, 2, 3] Math.min.apply(Math, nums) // 1 Math.max.apply(Math, nums) // 3 Math.min.apply(null, nums) // 1 Math.max.apply(null, nums) // 3 · With ES6/ES2016 destructuring assignment it becomes easier · The destructuring assignment syntax is a JavaScript expression that makes it possible to extract data from arrays or objects into distinct variables.
🌐
Gitbook
baldur.gitbook.io › js › js-math › mathematical › math-max-method
Math max()/min() Method | JS/TS
The Math.min() method is used to return the lowest-valued number passed in the method. The Math.min() method returns NaN if any parameter isn’t a number and can’t be converted into one.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Math › max
Math.max() - JavaScript | MDN
The following function uses Function.prototype.apply() to get the maximum of an array. getMaxOfArray([1, 2, 3]) is equivalent to Math.max(1, 2, 3), but you can use getMaxOfArray() on programmatically constructed arrays.
🌐
Webdevtutor
webdevtutor.net › blog › typescript-array-find-minimum
Finding Minimum Value in TypeScript Arrays
Another approach is to use the reduce method to find the minimum value in an array. Here's how you can do it: const numbers = [5, 2, 9, 1, 7]; const minNumber = numbers.reduce((min, current) => Math.min(min, current), numbers[0]); console.log(`Minimum number: ${minNumber}`);
🌐
Webdevtutor
webdevtutor.net › blog › typescript-array-get-min-value
How to Get the Minimum Value from an Array in TypeScript
Thankfully, TypeScript provides several ways to achieve this efficiently. Let's explore some methods to get the minimum value from an array in TypeScript. One of the simplest ways to find the minimum value in an array is by using the Math.min function along with the spread operator (...).
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › find-the-min-max-element-of-an-array-using-javascript
Min and Max of an Array in JavaScript - GeeksforGeeks
To find the minimum or maximum element in a JavaScript array, use Math.min or Math.max with the spread operator.
Published   August 2, 2025
🌐
Webdevtutor
webdevtutor.net › blog › typescript-get-min-value-from-array-of-objects
How to Get Min Value from Array of Objects in TypeScript
const arrayOfObjects = [{ value: 10 }, { value: 5 }, { value: 8 }]; const minValue = arrayOfObjects.reduce((min, obj) => obj.value < min ? obj.value : min, arrayOfObjects[0].value); console.log(minValue); // Output: 5 · Another approach is to use the map method to extract the values of a specific property from the objects and then find the minimum using the Math.min function.