Underscore.js _.isNumber() Function

The _.isNumber() function is used to check whether the given object parameter is number or not. If the given object is a number then it returns True value otherwise, it returns False.
Syntax:
_.isNumber( object )
Parameters: This function accepts one parameter as mentioned above and described below:
- object: This parameter holds the object element that need to be check whether it is number or not.
Return Value: It returns True if the given object is number, False otherwise.
Example 1:
| <!DOCTYPE html> <html>  Â<head>     <scripttype="text/javascript"src=     </script> </head>  Â<body>     <scripttype="text/javascript">  Â        var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];         console.log(_.isNumber(arr));  Â Â        var fun = function (element) {             return element % 2 != 0;         };         console.log(_.isNumber(fun));  Â        var str = 'zambiatek';         console.log(_.isNumber(str.length));     </script> </body>  Â</html>  | 
Output:
Example 2:
| <!DOCTYPE html> <html>  Â<head>     <scripttype="text/javascript"src=     </script> </head>  Â<body>     <scripttype="text/javascript">  Â        console.log(_.isNumber(true));         console.log(_.isNumber(10));         console.log(_.isNumber('zambiatek'));         console.log(_.isNumber(15.675));     </script> </body>  Â</html>  | 
Output:
Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, zambiatek Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
 
				 
					



