Lodash _.isArguments() Method
Last Updated :
03 Nov, 2023
Lodash _.isArguments() method checks if the value is likely an arguments object.
Syntax:
_.isArguments(value);
Parameters:
- value: It is the function that is used to check the value.
Return Value:
This method returns true if the value is an argument object else false.
Example 1: In this example, we are getting true as output because the given value is an argument object.
javascript
const _ = require( 'lodash' );
let argu = _.isArguments( function () { return arguments; }());
console.log(argu);
|
Output:
true
Example 2: In this example, we are getting false as output because the given value is not an argument object.
javascript
const _ = require( 'lodash' );
let object = _.isArguments([7, 7, 8]);
let argu = _.isArguments(object);
console.log(argu);
|
Output:
false
Note: This code will not work in normal JavaScript because it requires the library lodash to be installed.
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...