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 Web Docs
The Math.min() static method returns the smallest of the numbers given as input parameters, or Infinity if there are no parameters. 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(...
🌐
W3Schools
w3schools.com › jsref › jsref_min_value.asp
JavaScript MIN_VALUE Property
Number.MIN_VALUE returns the smallest number possible in JavaScript.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Number › MIN_VALUE
Number.MIN_VALUE - JavaScript - MDN Web Docs
July 10, 2025 - The Number.MIN_VALUE static data property represents the smallest positive numeric value representable in JavaScript.
🌐
W3Schools
w3schools.com › jsref › jsref_min.asp
JavaScript Math min() Method
The Math.min() method returns the number with the lowest value. ... Math.min() is an ECMAScript1 (JavaScript 1997) feature. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: ...
🌐
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.
🌐
Codecademy
codecademy.com › docs › javascript › number methods › .min_value
JavaScript | Number Methods | .MIN_VALUE | Codecademy
August 6, 2025 - The Number.MIN_VALUE constant represents the smallest positive numeric value that can be represented in JavaScript, which is greater than 0 but very close to it.
🌐
TechOnTheNet
techonthenet.com › js › math_min.php
JavaScript: Math min() function
In JavaScript, the syntax for the min() function is: Math.min([number1, number2, ... number_n]); ... Optional. The numbers that will be evaluated to determine the smallest value.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-number-min_value-property
JavaScript Number.MIN_VALUE Property - GeeksforGeeks
August 5, 2025 - Number.MIN_VALUE is the smallest possible positive number representable in JavaScript within float precision.
🌐
Scaler
scaler.com › home › topics › math min() javascript function
Math min() JavaScript Function - Scaler Topics
May 4, 2023 - The Javascript Math Min function is used to return the smallest of the values passed to it. The min() function is a static method of the in-built Math object.
🌐
TutorialsPoint
tutorialspoint.com › javascript › number_min_value.htm
JavaScript Number MIN_VALUE Property
The JavaScript Number MIN_VALUE property returns the minimum (or smallest) numeric value possible in JavaScript. If a value is smaller than the MIN_VALUE, it will be converted to zero (0).
🌐
Educative
educative.io › answers › what-is-numberminvalue-in-javascript
What is Number.MIN_VALUE in JavaScript?
Number.MIN_VALUE returns 5e-324, which is the smallest positive numerical value in JavaScript closest to zero.
🌐
Programiz
programiz.com › javascript › library › number › min_value
JavaScript Number.MIN_VALUE
The Number.MIN_VALUE property represents the smallest positive numeric value representable in JavaScript. In this article, you will learn about the Number.MIN_VALUE property.
🌐
Programiz
programiz.com › javascript › library › math › min
JavaScript Math min()
number1/number2/… - values among which the minimum number is to be computed ... // min() with positive numbers let numbers2 = Math.min(0.456, 135, 500); console.log(numbers2); // Output: // -132 // 0.456 · In the above example, we have used Math.min() to find the minimum number among:
🌐
Vultr Docs
docs.vultr.com › javascript › standard-library › Number › MIN_VALUE
JavaScript Number MIN_VALUE - Get Smallest Value | Vultr Docs
December 2, 2024 - The JavaScript Number.MIN_VALUE property represents the smallest positive numeric value that can be represented in JavaScript.
🌐
GeeksforGeeks
geeksforgeeks.org › 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.
🌐
TechOnTheNet
techonthenet.com › js › number_min_value.php
JavaScript: Number.MIN_VALUE property
This JavaScript tutorial explains how to use the Number property called MIN_VALUE with syntax and examples. In JavaScript, MIN_VALUE is a static property of the Number object that is used to return the smallest positive numeric value that is approaching 0. It does not return a negative value.