A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/javascript/lodash-_-isundefined-method/ below:

Lodash _.isUndefined() Method - GeeksforGeeks

Lodash _.isUndefined() Method

Last Updated : 20 Oct, 2023

Lodash _.isUndefined() method is used to find whether the given value is undefined or not. It returns True if the given value is undefined. Otherwise, it returns false.

Syntax:
_.isUndefined(value);
Parameters: Return Value:

This method returns true if the value is undefined, else false.

Example 1: In this example, we are printing the boolean result of whether the given value is undefined or not by the use of the _.isUndefined() method.

JavaScript
// The lodash library is included 
const _ = require("lodash");

// Use of _.isUndefined() method 
console.log(_.isUndefined(null));
console.log(_.isUndefined(void 0));
console.log(_.isUndefined('gfg')); 

Output:

false
true
false

Example 2: In this example, we are printing the boolean result of whether the given value is undefined or not by the use of the _.isUndefined() method.

JavaScript
// The lodash library is included
const _ = require("lodash");

// Use of _.isUndefined() method 
console.log(_.isUndefined(10));
console.log(_.isUndefined(undefined)); 

Output:

false
true


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