HomeLanguagesJavascriptLodash _.isArguments() Method

Lodash _.isArguments() Method

Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, collection, strings, lang, function, objects, numbers etc.

The _.isArguments() method checks if value is likely an arguments object.

Syntax:

_.isArguments(value)

Parameters: This method accepts single parameter as mentioned above and described below:

  • value: It is the function that is used to check the value.

Return Value: This method returns true if value is an arguments object else false.

Example 1: Here, const _ = require(‘lodash’) is used to import the lodash library in the file.




// Requiring the lodash library 
const _ = require("lodash"); 
       
// Using the _.isArguments() method
let argu = _.isArguments(function() 
    { return arguments; } ());
  
// Printing the output 
console.log(argu);


Output:

true

Example 2:




// Requiring the lodash library 
const _ = require("lodash"); 
       
// Original array 
var object = _.isArguments([ 7, 7, 8 ]);
  
// Using the _.isArguments() method
let argu = _.isArguments();
  
// Printing the output 
console.log(argu);


Output:

false

Note: This code will not work in normal JavaScript because it requires the library lodash to be installed.

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
RELATED ARTICLES

3 COMMENTS

Most Popular

Dominic
32533 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6913 POSTS0 COMMENTS
Nicole Veronica
12029 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12132 POSTS0 COMMENTS
Shaida Kate Naidoo
7043 POSTS0 COMMENTS
Ted Musemwa
7280 POSTS0 COMMENTS
Thapelo Manthata
7000 POSTS0 COMMENTS
Umr Jansen
6986 POSTS0 COMMENTS