Pass any value; branch on the boolean result — or migrate to native.
Have a value of unknown type (API data, option, argument).
Call $.isArray(value) (legacy) or Array.isArray(value) (preferred).
If true, treat it as a real array (.map, $.grep, etc.).
If array-like but not an array, convert with $.makeArray() first.
Piece
Required?
Role
obj
Yes
Value to test
Return
—
Boolean — true only for real arrays
Modern replacement
—
Array.isArray(obj)
Pseudocode
Pseudocode
function isArray(obj):
// true only for real Array instances
// false for {}, NodeList, jQuery, arguments, strings…
return Array.isArray(obj) // what modern jQuery uses
// Typical guard:
if isArray(data):
process as array
else if array-like:
data = makeArray(data)
else:
handle non-list
Reference
Cheat Sheet
Keep these facts handy while checking array types.
Use case. Guard before treating API data as a list.
Example 2 — Array-Like Is Not an Array
jQuery collections look list-like but fail the test.
jQuery
var $els = $("body");
var real = [1, 2, 3];
console.log($.isArray($els)); // false
console.log($.isArray(real)); // true
console.log($els.length); // 1 (array-like, still not an Array)
Same answers. Both APIs agree on arrays and non-arrays.
No jQuery needed.Array.isArray is built into modern browsers.
Deprecated path.$.isArray remains for reading old code on jQuery 3.x.
New projects. Call Array.isArray and skip the jQuery helper.
Edge Cases & Pitfalls
Check these before trusting a “list-like” value.
deprecated
Removed in jQuery 4.0
Do not add new $.isArray calls. Migrate to Array.isArray before upgrading past jQuery 3.x.
array-like
Length does not mean Array
jQuery objects, NodeLists, and arguments have length but return false. Convert with $.makeArray when needed.
typeof
typeof [] === "object"
Never use typeof to detect arrays. Use isArray / Array.isArray, or $.type for a type string.
null
null and primitives are false
$.isArray(null), undefined, numbers, and strings all return false — safe to call without a prior null check.
Compatibility
Browser Support
jQuery.isArray() is available from jQuery 1.3+ through jQuery 3.x. It is deprecated since 3.2 and removed in 4.0. Prefer Array.isArray() in all modern browsers.
✓ Deprecated · jQuery 3.x
jQuery.isArray()
Works in browsers with jQuery 1.3–3.x. For new code use Array.isArray() — supported in all current browsers. Not available in jQuery 4.0.
LegacyjQuery 3.x only
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
$.isArray()Legacy
Bottom line: Read $.isArray in legacy jQuery 3.x apps. Write Array.isArray(obj) for everything new.
Analysis
Performance Notes
Approach
Cost
Best for
Array.isArray(x)
O(1)
All new code
$.isArray(x)
O(1)
Legacy jQuery 3.x only
$.type(x) === "array"
Slightly heavier
Multi-type branching
Array checks are cheap. Prefer the native call for clarity and to avoid a removed jQuery API — not for micro-speed gains.
Remember
Key Takeaways
Role:$.isArray(obj) → true only for real arrays.
Migrate: use Array.isArray() in new code.
Array-like: jQuery / NodeList → false.
Avoid:typeof cannot detect arrays.
One line:$.isArray detects real arrays only — learn it for legacy code, write Array.isArray going forward.
Frequently Asked Questions
jQuery.isArray(obj) returns true when obj is a true JavaScript Array, and false otherwise. It does not treat array-like objects (jQuery collections, NodeLists, arguments) as arrays.
Yes. It was deprecated in jQuery 3.2 and removed in jQuery 4.0. Prefer the native Array.isArray() method in all new code.
No. NodeLists, HTMLCollections, arguments, and jQuery DOM collections return false. Convert with $.makeArray() (or Array.from) if you need a real array.
Both test for true arrays. In modern jQuery, $.isArray typically delegates to Array.isArray. Use Array.isArray in new projects; keep $.isArray only when reading legacy jQuery code.
typeof [] returns "object", the same as plain objects. That cannot tell arrays from {}. Use $.isArray() or Array.isArray() instead.
jQuery.type(value) returns the string "array" for arrays. jQuery.isArray(value) returns true for those same values. Prefer isArray (or Array.isArray) when you only need true/false.
Yes, if an older jQuery that still includes isArray is loaded. Prefer Array.isArray everywhere — it is native and does not need jQuery.