Lodash - isNull method



Syntax

_.isNull(value)

Checks if value is null.

Arguments

  • value (*) − The value to check.

Output

  • (boolean) − Returns true if value is null, else false.

Example

var _ = require('lodash');

console.log(_.isNull(null));
console.log(_.isNull(NaN));

Save the above program in tester.js. Run the following command to execute this program.

Command

\>node tester.js

Output

true
false
lodash_lang.htm
Advertisements