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
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Math › min
Math.min() - JavaScript | MDN
The Math.min() static method returns the smallest of the numbers given as input parameters, or Infinity if there are no parameters.
🌐
W3Schools
w3schools.com › jsref › jsref_min.asp
W3Schools.com
The Math.min() method returns the number with the lowest value.
Discussions

Why don't Math.max and Math.min accept arrays? Why are they n-arity functions?
or ES6+ version Math.min(...myNums) More on reddit.com
🌐 r/javascript
33
40
February 13, 2017
Type Math.min & Math.max using generic
In DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript ... min(...values: [T, ...T[]]): T; min(): number; // Because this will return Infinity · Because Math.min should never return things that aren't its input. More on github.com
🌐 github.com
9
April 14, 2019
typescript - Using Math.min.apply on a Float32Array - Stack Overflow
Knowing all of the above, what you are trying to do looks correct and it seems like a TypeScript bug. As for why that is happening, currently the definitions for Math.min and CallableFunction.apply are as follows: More on stackoverflow.com
🌐 stackoverflow.com
Why is Math.max() less than Math.min()?
I got this far in the article: > Math.max() Math.max() -Infinity > Math.min() Infinity So really it's just saying that negative infinity is less than positive infinity, which is true. And it makes sense that those are the 'default' values you get when you don't supply any arguments, as they're basically the respective identities for the two functions. Just like 0 is the additive identity and 1 is the multiplicative, -Infinity is the "maximizing" identity. For any number X, Math.max(-Infinity, X) is X. More on reddit.com
🌐 r/javascript
28
98
February 24, 2015
🌐
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
🌐
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 ·
🌐
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);

🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-math-min-method
JavaScript Math min() Method - GeeksforGeeks
July 15, 2024 - The JavaScript 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.
Find elsewhere
🌐
GitHub
github.com › Microsoft › TypeScript › issues › 30924
Type Math.min & Math.max using generic · Issue #30924 · microsoft/TypeScript
April 14, 2019 - In DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript ... min<T extends number>(...values: [T, ...T[]]): T; min(): number; // Because this will return Infinity · Because Math.min should never return things that aren't its input.
Published   Apr 14, 2019
🌐
Vultr Docs
docs.vultr.com › javascript › standard-library › Math › min
JavaScript Math min() - Find Minimum Value | Vultr Docs
November 27, 2024 - The Math.min() function in JavaScript is a method used to determine the smallest value among the given arguments.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Math
Math - JavaScript | MDN
This can be achieved with a combination of Math.random() and Math.floor(): ... function random(min, max) { const num = Math.floor(Math.random() * (max - min + 1)) + min; return num; } random(1, 10);
🌐
W3Schools
w3schools.com › java › ref_math_min.asp
Java Math min() Method
How Tos Add Two Numbers Swap Two Variables Even or Odd Number Reverse a Number Positive or Negative Square Root Area of Rectangle Celsius to Fahrenheit Sum of Digits Check Armstrong Num Random Number Count Words Count Vowels in a String Remove Vowels Count Digits in a String Reverse a String Palindrome Check Check Anagram Convert String to Array Remove Whitespace Count Character Frequency Sum of Array Elements Find Array Average Sort an Array Find Smallest Element Find Largest Element Second Largest Array Min and Max Array Merge Two Arrays Remove Duplicates Find Duplicates Shuffle an Array Factorial of a Number Fibonacci Sequence Find GCD Check Prime Number ArrayList Loop HashMap Loop Loop Through an Enum
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › api › system.math.min
Math.Min Method (System) | Microsoft Learn
Public Shared Function Min (val1 As UInteger, val2 As UInteger) As UInteger · val1 · UInt32 · The first of two 32-bit unsigned integers to compare. val2 · UInt32 · The second of two 32-bit unsigned integers to compare. UInt32 · Parameter val1 or val2, whichever is smaller. Attributes · CLSCompliantAttribute · Source: Math.cs ·
🌐
TutorialsPoint
tutorialspoint.com › home › javascript › javascript math.min() function
Understanding JavaScript Math.min() Function
September 1, 2008 - In JavaScript, the Math.min() method accepts any number of arguments, and it returns the minimum value among those arguments.If any of the arguments is not a number, "NaN" (Not-a-Number) is returned.
🌐
Scaler
scaler.com › home › topics › math min() javascript function
Math min() JavaScript Function - Scaler Topics
May 4, 2023 - The Math.min() function returns the smallest value of all the passed values. In case no value is passed to the function it will return positive infinity as it compares the first value with positive infinity and in absence of a first value, the ...
🌐
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
🌐
Gitbook
baldur.gitbook.io › js › js-math › mathematical › math-max-method
Math max()/min() Method | JS/TS
January 18, 2021 - 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.