Lodash - isUndefined method


Advertisements

Syntax

_.isUndefined(value)

Checks if value is undefined.

Arguments

  • value (*) − The value to check.

Output

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

Example

var _ = require('lodash');

console.log(_.isUndefined(void 0));
console.log(_.isUndefined(null));

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