You'll have to extract the properties from the objects yourself:

var maximum = Math.max.apply(Math, myArr.map(function(o) { return o.x; }));

That uses .map() to iterate through the elements of the array and return the value of the "x" property. That result array is then passed as the arguments to Math.max().

Now that => functions are widely available it'd be a little shorter as so:

var maximum = Math.max.apply(Math, myArr.map(o => o.x));

Still doing pretty much the exact same thing of course.

Answer from Pointy on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Math › max
Math.max() - JavaScript | MDN
Math.max(10, 20); // 20 Math.max(-10, -20); // -10 Math.max(-10, 20); // 20 · Array.prototype.reduce() can be used to find the maximum element in a numeric array, by comparing each value: js · const arr = [1, 2, 3]; const max = arr.reduce((a, b) => Math.max(a, b), -Infinity); The following function uses Function.prototype.apply() to get the maximum of an array.
🌐
W3Schools
w3schools.com › jsref › jsref_max.asp
JavaScript Math max() Method
The Math.max() method returns the number with the highest value.
🌐
MathWorks
mathworks.com › matlab › data import and analysis › descriptive statistics
max - Maximum elements of array - MATLAB
If A is a matrix, then max(A) is a row vector containing the maximum value of each column of A. If A is a multidimensional array, then max(A) operates along the first dimension of A whose size does not equal 1, treating the elements as vectors. The size of M in this dimension becomes 1, while ...
🌐
Built In
builtin.com › articles › javascript-array-max
3 Methods to Find the JavaScript Array Max | Built In
If the current element is greater, ... } } console.log(max); // Outputs: 8 · JavaScript’s Math.max() can find the maximum among individual numbers....
🌐
Programiz
programiz.com › java-programming › library › math › max
Java Math max()
// compare all elements with max // assign maximum value to max max = Math.max(max, arr[i]); } System.out.println("Maximum Value: " + max); } } In the above example, we have created an array named arr.
🌐
Math.js
mathjs.org › docs › reference › functions › max.html
math.js
math.max(2, 1, 4, 3) // returns 4 math.max([2, 1, 4, 3]) // returns 4 // maximum over a specified dimension (zero-based) math.max([[2, 5], [4, 3], [1, 7]], 0) // returns [4, 7] math.max([[2, 5], [4, 3], [1, 7]], 1) // returns [5, 4, 7] 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
Find elsewhere
🌐
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
🌐
Programiz
programiz.com › javascript › library › math › max
JavaScript Math max()
Here, ... is the spread operator that destructures the array and passes the array values as arguments to max(). The method then finds the smallest number. // max() with the string argument let numbers1 = Math.max("Dwayne", 2, 5, 79); console.log(numbers1);
🌐
Jsremote
jsremote.jobs › tutorials › math-max
What is the Math.max() method in JavaScript? | Web developer jobs
For the most part, using the Math.max() function in JavaScript is easy and straightforward. Its primary use is to get the largest number of zero or more numbers. Don’t forget that you can utilize this function when working with arrays, making it a huge advantage for working with vast bulks of data.
🌐
SheCodes
shecodes.io › athena › 1878-using-math-max-to-find-maximum-value-in-javascript
[JavaScript] - Using `Math.max()` to Find Maximum Value in | SheCodes
Learn how to use the JavaScript Math.max() method to find the largest of zero or more numbers. Understand how to use `Math.max.apply()` with an array.
🌐
Vultr Docs
docs.vultr.com › javascript › standard-library › Math › max
JavaScript Math max() - Find Maximum Value | Vultr Docs
November 27, 2024 - By accepting multiple numbers or an array of numbers (with a spread operator), this method evaluates and returns the largest number in the set, facilitating numerical comparisons directly in your code.
🌐
freeCodeCamp
forum.freecodecamp.org › guide
JavaScript Math.max() Explained with Examples
September 8, 2019 - If a non-numeric value is passed as a parameter, Math.max() will return NaN . An array of numeric values can be passed as a single parameter to Math.max() using either spread (...) or apply .
🌐
Dmitri Pavlutin
dmitripavlutin.com › javascript-math-max-infinity
Why Math.max() Without Arguments Returns -Infinity
Math.max(num1, num2, ..., numN) accepts multiple number arguments and returns the maximum number of them. Simple as a pie. If you want to determine the maximum number of an array, then you can use the spread arguments operator on the array:
🌐
YouTube
youtube.com › watch
How to Find Maximum and Minimum in an Array in JavaScript |Use Math.max() and Math.min() in JS - YouTube
Want to find the highest or lowest value in a JavaScript array? In this beginner-friendly tutorial, you'll learn how to find the maximum and minimum values i...
Published   July 6, 2025
🌐
MDN
mdn2.netlify.app › en-us › docs › web › javascript › reference › global_objects › math › max
Math.max() - JavaScript | MDN
Math.max(10, 20); // 20 Math.max(-10, -20); // -10 Math.max(-10, 20); // 20 · Array.reduce() can be used to find the maximum element in a numeric array, by comparing each value: var arr = [1,2,3]; var max = arr.reduce(function(a, b) { return ...