The _.isArguments() function is used to check whether the given object is an argument or not. It returns a Boolean value True if the given object is an argument and False otherwise.
Syntax:
_.isArguments( object )
Parameters: This function accepts one parameter as mentioned above and described below:
- object: This parameter holds the value of object that need to be check whether it is an argument or not.
Return Value: It returns True if the given object is an arguments and False otherwise.
Example 1:
<!DOCTYPE html> <html> Â Â <head> Â Â Â Â <script type="text/javascript" src= Â Â Â Â </script> </head> Â Â <body> Â Â Â Â <script type="text/javascript"> Â Â Â Â Â Â Â Â Â Â var arg = (function () { Â Â Â Â Â Â Â Â Â Â Â Â return _.isArguments(arguments); Â Â Â Â Â Â Â Â })('Welcome', 'to', 'neveropen'); Â Â Â Â Â Â Â Â Â Â console.log(arg); Â Â Â Â </script> </body> Â Â </html> |
Output:
Example 2:
<!DOCTYPE html> <html> Â Â <head> Â Â Â Â <script type="text/javascript" src= Â Â Â Â </script> </head> Â Â <body> Â Â Â Â <script type="text/javascript"> Â Â Â Â Â Â Â Â Â Â console.log(_.isArguments(true)); Â Â Â Â Â Â Â Â console.log(_.isArguments(1)); Â Â Â Â Â Â Â Â console.log(_.isArguments('neveropen')); Â Â Â Â Â Â Â Â console.log(_.isArguments([1, 2, 3])); Â Â Â Â </script> </body> Â Â </html> |
Output:

