One-liner for you:

 Math.max.apply(Math, $.map(array, function (el) { return el.length }));

Working example: http://jsfiddle.net/5SDBx/

You can do it without jQuery in newer browsers (or even older browsers with a compatibility implementation of Array.prototype.map) too:

Math.max.apply(Math, array.map(function (el) { return el.length }));
Answer from Andy E on Stack Overflow
🌐
Stack Overflow
stackoverflow.com › questions › 71637634 › how-to-get-the-array-element-which-has-a-maximum-length-in-the-given-array
javascript - how to get the array element which has a maximum length in the given array - Stack Overflow
Then you just access it from the array. An examen of the code: let maxLengthIndex=0 let maxlength=function fn(){ for(i7=0 ; i7<a.length ; i7++){ if(a[i7].length > a[maxLengthIndex].length){ maxLengthIndex = i7 } } return a[maxLengthIndex] }
🌐
Medium
sachinkasana.medium.com › node-js-array-limits-whats-the-maximum-length-you-can-reach-ae2d5bdd13a4
Node.js Array Limits: What’s the Maximum Length You Can Reach? | by Sachin Kasana | Medium
August 22, 2024 - To start, a quick look at the documentation reveals that the maximum length of an array in JavaScript (and by extension, Node.js) is 232−12^{32} — 1232−1, which equals 4,294,967,295 elements.
🌐
GitHub
github.com › mock-end › max-array-length
GitHub - mock-end/max-array-length: Return the maximum length of array in JavaScript. · GitHub
Return the maximum length of array in JavaScript. Contribute to mock-end/max-array-length development by creating an account on GitHub.
Author: mock-end
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Math › max
Math.max() - JavaScript - MDN Web Docs
Math.max.length is 2, which weakly signals that it's designed to handle at least two parameters. ... Array.prototype.reduce() can be used to find the maximum element in a numeric array, by comparing each value:
🌐
W3Resource
w3resource.com › javascript-exercises › javascript-basic-exercise-83.php
JavaScript basic: Find the longest string from a given array of strings - w3resource
... // Function to find the longest string(s) in an array function longest_string(str_ara) { var max = str_ara[0].length; // Initialize max length with the length of the first string str_ara.map(v => max = Math.max(max, v.length)); // Update ...
🌐
W3Resource
w3resource.com › javascript-exercises › javascript-basic-exercise-125.php
JavaScript basic: Find the longest string from a given array - w3resource
July 2, 2025 - See the Pen javascript-basic-exercise-125 by w3resource (@w3resource) on CodePen. ... // Function to find the longest string in an array const longest_str_in_array = (arra) => { let max_str = arra[0].length; // Initialize max_str with the length of the first string let ans = arra[0]; // Initialize ans with the first string // Loop through the array starting from the second element for (let i = 1; i < arra.length; i++) { let maxi = arra[i].length; // Get the length of the current string // Compare the length of the current string with max_str if (maxi > max_str) { ans = arra[i]; // If current s
Find elsewhere
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Array › length
Array: length - JavaScript - MDN Web Docs
The length data property of an Array instance represents the number of slots in that array. The value is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array. It may be greater than the number of elements if the array is sparse.
🌐
Stack Overflow
stackoverflow.com › questions › 37461624 › the-max-length-of-an-array-in-javascript
the max length of an array in javascript - Stack Overflow
May 26, 2016 - Bring the best of human thought and AI automation together at your work. Explore Stack Internal ... Save this question. Show activity on this post. ... Closed 9 years ago. I've met a problem in learning javascript.Here is my code: var arr = []; for (let i = 0; i <4294967296; i=i+1){ arr[i] = 1;} But both in chrome and firefox,it ended up with something wrong.I know that the max length of an array is 4294967295(2^32-1) in javascript,when i changed 4294967296 to 4294967295, 4294967294 , or a little more smaller,it still didn't work.I also tested it in Node.js,after a while of executing,it just ended with:
🌐
Medium
medium.com › frontend-canteen › a-legendary-interview-question-what-is-the-maximum-length-of-an-array-in-nodejs-f7299a485f84
A Legendary Interview Question: What is the Maximum Length of An Array in Nodejs? | by Shuai Li | Programming Domain | Medium
August 12, 2024 - Ok, first we Google this question, and then we can find the MDN documentation. This document tells us that the maximum length of an array in JavaScript is 2³²-1.
🌐
JavaScript Tutorial
javascripttutorial.net › home › javascript array methods › javascript array length
JavaScript Array Length Property
November 4, 2024 - By definition, the length property of an array is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array. The maximum value of the length is 232.
🌐
npm
npmjs.com › package › @stdlib › constants-array-max-array-length
@stdlib/constants-array-max-array-length - npm
The maximum length for a generic array is '+MAX_ARRAY_LENGTH+'. To create a longer array-like data structure, consider either typed arrays or an array-like object.' ); } // Manually allocate to ensure "fast" elements...
      » npm install @stdlib/constants-array-max-array-length
    
Published: Feb 07, 2026
Version: 0.2.3
🌐
W3docs
w3docs.com › javascript
How to Find the Min/Max Elements in an Array in JavaScript | W3Docs
You can use the standard loop for tons of arguments as for loop doesn’t have size limitation: ... let max = testArray[0]; for (let i = 1; i < testArrayLength; ++i) { if (testArray[i] > max) { max = testArray[i]; } } let min = testArray[0]; ...
🌐
Medium
kyoshee.medium.com › how-to-find-longest-string-value-in-javascript-array-62f09bb20fb6
How to find the longest (string) value in JavaScript array | by Web Artisan Developer | Medium
June 19, 2023 - for (let i = 0; i < arrLength; i++) { const value = arr[i]; if (primitives.includes(typeof value)) { const valueLength = value.toString().length; if (valueLength > longestLength) { longestLength = valueLength; longestValue = value; } } } for (const value of arr) { if (primitives.includes(typeof value)) { const valueLength = value.toString().length; if (valueLength > longestLength) { longestLength = valueLength; longestValue = value; } } }
🌐
W3Schools
w3schools.com › jsref › jsref_length_array.asp
JavaScript Array length Property
The length property sets or returns the number of elements in an array.
🌐
O'Reilly
oreilly.com › library › view › javascript-the-definitive › 9781449393854 › ch07.html
7. Arrays - JavaScript: The Definitive Guide, 6th Edition [Book]
May 3, 2011 - JavaScript arrays are zero-based and use 32-bit indexes: the index of the first element is 0, and the highest possible index is 4294967294 (232−2), for a maximum array size of 4,294,967,295 elements.
Author: David Flanagan
Published: 2011
Pages: 1093
🌐
Medium
medium.com › @amitsharma_24072 › 3-efficient-ways-to-find-maximum-value-in-javascript-arrays-515463ebd17
3 Efficient Ways to Find Maximum Value in JavaScript Arrays | by Amit Sharma | Medium
July 11, 2024 - For loop will iterate over the array and compare each element to find the maximum value: const arr = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3]; let max = arr[0]; for (let i = 1; i < arr.length; i++) { if (arr[i] > max) { max = arr[i]; } } console.log(max); // Output: 9 · The sort() method is a built-in JavaScript method that sorts the elements of an array.