The _.isString() function is used to check whether the given object element is string or not.
Syntax:
_.isString( object )
Parameters: This function accepts single parameter as mentioned above and described below:
- object: It contains the value of object that need to be check whether it is an string or not.
Return Value: It returns a Boolean value True if given object element is string, False otherwise.
Example 1:
| <!DOCTYPE html> <html>  Â<head>     <scripttype="text/javascript"            src=     </script> </head>  Â<body>     <scripttype="text/javascript">  Â        var info = {             Company: 'neveropen',             Address: 'Noida',             Contact: '+91 9876543210'         };         console.log(_.isString(info));  Â        var str = 'neveropen';         console.log(_.isString(str));     </script> </body>  Â</html>  | 
Output:
Example 2:
| <!DOCTYPE html> <html>  Â<head>     <scripttype="text/javascript"            src=     </script> </head>  Â<body>     <scripttype="text/javascript">  Â        console.log(_.isString(true));         console.log(_.isString(10));         console.log(_.isString('neveropen'));         console.log(_.isString("20"));     </script> </body>  Â</html>  | 
Output:

 
                                    








