Underscore.js _.isArguments() Method

Beginner
5 min read
Updated: Nov 2026
4 examples
Object

Definition

Returns true if object is an Arguments object (official Underscore docs). Arrays and array-like look-alikes return false.

Pass the required arguments shown below. Underscore object helpers usually return a new value — check whether the source object is mutated.

Syntax

Call _.isArguments. Start with this line.

Underscore
_.isArguments(object)
CallWhat it does
_.isArguments(object)Primary signature.
_.isArguments(...)Call with the arguments your case needs.

Load Underscore with import _ from "underscore" (or the UMD CDN build) so these helpers are available as _.

Library declarations
Underscore
_.isArguments(object)

Parameters

ParameterDescription
objectRequired. Value to test

Return Value

Return ValueDescription
*true or false

Underscore.js Examples

Example 1 — Official Docs

The docs show arguments passing and a real array failing.

Underscore
(function () {
  return _.isArguments(arguments);
})(1, 2, 3);
// → true

_.isArguments([1, 2, 3]);
// → false
Try It Yourself

How It Works

  1. Call a function. Passing 1, 2, 3 creates an Arguments object.
  2. Test it. _.isArguments(arguments) → true.
  3. Test an array. [1, 2, 3] looks similar but is a real Array → false.
  4. Takeaway. Same values, different types — the helper checks the type, not the contents.

Example 2 — _.isArguments vs _.isArray

They answer opposite questions for the same value.

Underscore
(function () {
  console.log(_.isArguments(arguments), _.isArray(arguments));
  // → true false
})(1, 2, 3);

console.log(_.isArguments([1, 2, 3]), _.isArray([1, 2, 3]));
// → false true
Try It Yourself

How It Works

  1. Arguments path. Passes isArguments, fails isArray.
  2. Array path. Fails isArguments, passes isArray.
  3. Why it matters. Array methods like .map need a real Array.
  4. Rule. Pick the helper that matches the type you actually have.

Example 3 — Convert with _.toArray

Need .map? Build a real Array first — the original stays Arguments.

Underscore
(function () {
  var list = _.toArray(arguments);

  console.log(_.isArguments(arguments)); // true
  console.log(_.isArray(list));          // true
  console.log(list);                     // ["a", "b"]
})("a", "b");
Try It Yourself

How It Works

  1. Start with arguments. Still an Arguments object → isArguments is true.
  2. Copy with _.toArray. Creates a new real Array.
  3. Check the copy. _.isArray(list) → true.
  4. Use array APIs. Call .map, .filter, etc. on list, not on arguments.

Example 4 — Rest Parameters Are Arrays

Modern ...args is the opposite of classic arguments.

Underscore
function classic() {
  console.log(_.isArguments(arguments), _.isArray(arguments));
  // → true false
}
classic(1, 2);

function modern(...args) {
  console.log(_.isArguments(args), _.isArray(args));
  // → false true
}
modern(1, 2);
Try It Yourself

How It Works

  1. Classic function. JS builds an Arguments object → isArguments is true.
  2. Rest parameter. ...args is a real Array → isArguments is false.
  3. Prefer rest in new code. You get .map without converting.
  4. Still useful. Use _.isArguments when older APIs may pass classic arguments.

Browser & Runtime Support

_.isArguments ships with Underscore.js (1.x). It runs anywhere Underscore runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install underscore.

✓ Stable · Underscore 1.x

_.isArguments()

Available in [email protected] (UMD / ESM). Works in evergreen browsers and current Node LTS when Underscore is loaded. Relies on the standard Arguments object (or a legacy callee fallback in very old engines).

100% With Underscore 1.x
Google Chrome Supported · Desktop & Mobile
Full support
Mozilla Firefox Supported · Desktop & Mobile
Full support
Apple Safari Supported · macOS & iOS
Full support
Microsoft Edge Supported · Chromium
Full support
Internet Explorer No native support · Use a polyfill
Polyfill
Opera Supported · Modern versions
Full support
Samsung Internet Supported · Android
Full support
Bun Supported · JavaScript runtime
Supported
Deno Supported · JavaScript runtime
Supported
Node.js Supported · Server runtime
Supported
Android WebView Supported · Modern WebView
Full support
_.isArguments Underscore 1.x+

Bottom line: Safe for production once Underscore is on the page or in your bundle. Not a native browser API — load Underscore first. Prefer a pinned CDN version (e.g. [email protected]).

Frequently Asked Questions

_.isArguments(object) returns true only when the value is an Arguments object — the special array-like object created inside a non-arrow function. Real arrays such as [1, 2, 3] return false.
arguments has a length and indexed values, so it feels like a list. It is not created by the Array constructor, so it has no .map or .filter. _.isArguments is true; _.isArray is false.
isArguments is true only for the arguments object. isArray is true only for real Array instances. They almost never both return true for the same value.
No. Rest parameters (...args) are real arrays. _.isArguments(args) is false and _.isArray(args) is true — the opposite of classic arguments.
Use _.toArray(arguments) or Array.from(arguments). After converting, _.isArray is true and you can call .map, .filter, and other array methods.
No. It is a stable Underscore 1.x helper. The arguments object is still standard JavaScript; rest parameters are simply the modern alternative in new code.

Next: _.isFunction()

Test whether a value is a callable function — another core Underscore type check.

_.isFunction() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful