_.isNaN

_.isNaN(value)

Checks if value is NaN.

Note: This method is based on Number.isNaN and is not the same as global isNaN which returns true for undefined and other non-number values.

Since

0.1.0

Arguments

  1. value (*): The value to check.

Returns

(boolean): Returns true if value is NaN, else false.

Example

1
2
3
4
5
6
7
8
9
10
11
12
_.isNaN(NaN);
// => true
  
_.isNaN(new Number(NaN));
// => true
  
 
isNaN(undefined);
// => true
  
_.isNaN(undefined);
// => false
doc_Lodash
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.