jQuery.makeArray(obj) (alias $.makeArray) turns an array-like object into a true JavaScript Array (since jQuery 1.2) so you can use .reverse(), .map(), .pop(), and other native methods.
Remember
$.makeArray(obj) → Array
// NodeList / HTMLCollection
var elems = document.getElementsByTagName("div");
var arr = $.makeArray(elems);
arr.reverse();
// jQuery collection
$.makeArray($("li")); // plain array of DOM nodes
// Array.isArray(result) → true
Start with a NodeList, HTMLCollection, jQuery object, or arguments.
Call $.makeArray(obj).
Use native array methods (reverse, map, filter, …).
Wrap with $(arr) only if you need jQuery methods again.
Piece
Required?
Role
obj
Yes
Array-like object to convert
Return
—
Plain JavaScript Array
Since
—
jQuery 1.2
Pseudocode
Pseudocode
function makeArray(obj):
result = []
for i from 0 to obj.length - 1:
result.push(obj[i])
return result // true Array — no jQuery methods
// Official idea:
elems = document.getElementsByTagName("div") // HTMLCollection
arr = $.makeArray(elems)
arr.reverse()
$(arr).appendTo(document.body)
Reference
Cheat Sheet
Keep these facts handy while converting array-like values.
Topic
Detail
Syntax
jQuery.makeArray(obj)
Since
jQuery 1.2
Input
NodeList, jQuery, arguments, …
Output
Plain Array
jQuery methods
Lost after conversion
vs toArray()
Instance method on jQuery only
vs Array.from()
Native ES2015+ cousin
Try it
Live Preview
Convert a sample array-like value with $.makeArray and inspect the result.
First
Second
Third
Fourth
A
B
Browser demo of $.makeArray(obj) — same idea as the examples below.
Short, copy-ready snippets. Open DevTools Console, or use Try It Yourself for a live editor.
Example 1 — Convert a NodeList
Turn querySelectorAll into a real array.
jQuery
var nodeList = document.querySelectorAll("p");
var arr = $.makeArray(nodeList);
console.log(Array.isArray(nodeList)); // false
console.log(Array.isArray(arr)); // true
console.log(arr.length); // number of <p> nodes
jQuery.makeArray() needs a browser (or DOM) with jQuery loaded. It has been available since jQuery 1.2+ in all browsers your jQuery build supports.
✓ jQuery 1.2+ · Browsers
jQuery.makeArray()
Works in Chrome, Firefox, Safari, Edge, and other browsers with jQuery loaded. Convert NodeLists, jQuery objects, and arguments into true arrays.
100%Browser support
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
$.makeArray()Browsers
Bottom line: Use $.makeArray(obj) whenever you need native array methods on an array-like value in jQuery code.
Analysis
Performance Notes
Approach
Cost
Best for
$.makeArray(obj)
O(n)
Any array-like in jQuery apps
$(sel).toArray()
O(n)
jQuery collections only
Array.from(obj)
O(n)
Modern JS without jQuery
Conversion copies references into a new array — cheap for typical DOM sizes. Prefer converting once, then chaining native methods, instead of converting repeatedly.
Remember
Key Takeaways
Role:$.makeArray(obj) → true JavaScript array.
Input: NodeList, jQuery, arguments, other array-likes.
Trade-off: gain native methods; lose jQuery methods.
Cousins:.toArray() / Array.from().
One line:$.makeArray(obj) turns array-like values into real arrays so .reverse(), .map(), and friends work.
Frequently Asked Questions
jQuery.makeArray(obj) converts an array-like object into a true JavaScript Array. It returns a plain array you can pass to native methods like .reverse(), .map(), and .filter(), or to jQuery utilities such as $.merge() and $.grep().
Any object with a numeric length and indexed values — NodeLists, HTMLCollections, the arguments object, jQuery collections, and custom { 0: 'a', 1: 'b', length: 2 } objects. Plain objects without length are not array-like.
makeArray() is a static utility that accepts any array-like input. toArray() is an instance method on a jQuery DOM collection only. Both produce a plain JavaScript array of DOM nodes when starting from a jQuery selection.
No. After conversion the result is a plain array. jQuery-specific methods on the original jQuery object are gone — wrap again with $() if you need jQuery methods on the elements.
Both convert array-like objects to arrays. Array.from() is native ES2015+. jQuery.makeArray() has been available since jQuery 1.2 and is a natural fit in jQuery codebases for NodeLists, jQuery objects, and the arguments object.
Use $.makeArray() when you already depend on jQuery, need to convert the arguments object, or want one consistent utility across NodeLists and jQuery objects. Modern code may use [...nodeList] or Array.from() when jQuery is not required.