Underscore.js _.isObject() Function (original) (raw)
Last Updated : 25 Apr, 2025
Underscore.js**_.isObject() function is used to check whether the given object is an object or not. It returns a Boolean value True if the given object element is an object and returns False otherwise. JavaScript functions and arrays are objects, while the strings and numbers are not objects.
**Syntax:
_.isObject( value );
**Parameters:
- **object: This parameter holds the value of the object that needs to be checked whether it is an object or not.
**Return Value:
It returns True if the given object element is an object and False otherwise.
**Example 1: This example shows the use of the underscore.js _.isObject() function.
html
**Output:
**Example 2: This example shows the use of the underscore.js _.isObject() function.
html
**Output:
Similar Reads
- Underscore.js _.isSet() Function Underscore.js is a library in javascript that makes operations on arrays, string, objects much easier and handy. _.isSet() function is used to check whether the given object is javascript set or not. When linking the underscore.js CDN The "_" is attached to the browser as global variable. Syntax: _. 2 min read
- Underscore.js _.object() Function _.object() function: It converts the array elements into objects. We can either pass all keys and then all the values or we can pass the key along with their value in pairs. It is used if we have more than one array but we want to make/ form a relation between these arrays. Also, size of the arrays 3 min read
- Underscore.js _.invert() Function Underscore.js _.invert() function is used to return the copy of an object where the object key is converted into value and object value is converted into the key. It means the [key, value] of the object is reversed. Syntax:_.invert( object );Parameters:object: It contains the object element that hol 1 min read
- Underscore.js _.mapObject() Function The _.mapObject() function is similar to the map but used for the object. This function transforms each value of the object based on the given function/operation. Syntax: _.mapObject(object, iteratee, [context]) Parameters: This function accepts three parameters as mentioned above and described belo 1 min read
- Underscore.js _.isBoolean() Function The Underscore.js is a JavaScript library that provides a lot of useful functions like the map, filter, invoke, etc even without using any built-in objects. The _isBoolean function is used to find whether the element passed is true/ false or something else. Boolean is a subset of algebra that is use 3 min read
- Underscore.js _.isWeakSet() Function Underscore.js is a JavaScript library that makes operations on arrays, string, objects much easier and handy. he _.isWeakSet() function is used to check whether the given object is JavaScript weakset or not. When linking the underscore.js CDN, the "_" is attached to the browser as global variable. S 2 min read
- Underscore.js _.isMap() Function Underscore.js is a library in javascript that makes operations on arrays, string, objects much easier and handy. _.isMap() function is used to check whether the given object is javascript Map or not. Note: It is very necessary to link the underscore CDN before going and using underscore functions in 2 min read
- Underscore.js _.isError() Function Underscore.js is a library in javascript that makes operations on arrays, string, objects much easier and handy. _.isError() function is used to check whether the given object is javascript Error Object or not. Note: It is very necessary to link the underscore CDN before going and using underscore f 2 min read
- Underscore.js _.isMatch() Function It _.isMatch() function: is used to find out if the property given in argument is present in the passed array or not. Also, the property's value should be the same in order to match. It is used in cases where we want to find whether the array satisfies a specific condition or not. Syntax:_.isMatch(o 3 min read
- Underscore.js _.isNaN() Function _.isNaN() function:Â It is used to find whether the value of the object passed is NaN or not.If the object's value is NaN then the output will be true otherwise, it will be false.We can even perform addition, subtraction etc operations in this function. Syntax:Â _.isNaN(object) Parameters:It takes o 3 min read