Underscore.js _.isObject() Function Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report 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 <!DOCTYPE html> <html> <head> <script type="text/javascript" src= "https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js"> </script> </head> <body> <script type="text/javascript"> let info = { Company: { name: 'GeeksforGeeks' }, Contact: { Address: { AddressInfo: 'Noida', ContNo: '+91 9876543210' } } }; console.log(_.isObject(info)); </script> </body> </html> Output: Example 2: This example shows the use of the underscore.js _.isObject() function. html <!DOCTYPE html> <html> <head> <script type="text/javascript" src= "https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js"> </script> </head> <body> <script type="text/javascript"> console.log(_.isObject(true)); console.log(_.isObject(1)); console.log(_.isObject('GeeksforGeeks')); console.log(_.isObject([1, 2, 3])); </script> </body> </html> Output: Comment More infoAdvertise with us Next Article Underscore.js _.isObject() Function A ashokjaiswal Follow Improve Article Tags : JavaScript Web Technologies JavaScript - Underscore.js 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 _.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 Like