Last Updated : 04 Sep, 2024
Lodash _.isNumber() method is used to find whether the given value parameter is a number or not. If the given value is a number then it returns True value otherwise, it returns False.
Syntax:_.isNumber(value);Parameters:
Example 1: In this example, we are checking whether the given value is a number or not by the use of the _.isNumber() method.
JavaScript
// Requiring the lodash library
const _ = require("lodash");
// Use of _.isNumber() method
console.log(_.isNumber(10));
console.log(_.isNumber('GeeksforGeeks'));
console.log(_.isNumber(15.675));
Output:
true
false
true
Example 2: In this example, we are checking whether the given value is a number or not by the use of the _.isNumber() method.
JavaScript
// Requiring the lodash library
const _ = require("lodash");
// Use of _.isNumber()
// method
console.log(_.isNumber(true));
console.log(_.isNumber(Number.MIN_VALUE));
console.log(_.isNumber(Infinity));
console.log(_.isNumber('3'));
Output:
false
true
true
false
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4