A RetroSearch Logo

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

Search Query:

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

Lodash _.isWeakSet() Method - GeeksforGeeks

Lodash _.isWeakSet() Method

Last Updated : 03 Nov, 2023

Lodash _.isWeakSet() method is used to find whether the given value is a weakset object or not. It returns true if the given value is a weak object. Otherwise, it returns false.

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

This method returns true if the value is a weak set, else false.

Example 1: In this example, we are checking whether the given value is a weak set or not and printing the output accordingly.

JavaScript
// Requiring the lodash library  
const _ = require("lodash");

// Use of _.isWeakSet() method 
console.log(_.isWeakSet(new Set));

Output:

false

Example 2: In this example, we are checking whether the given value is a weak set or not and printing the output accordingly.

JavaScript
// Requiring the lodash library  
const _ = require("lodash");  
    
// Use of _.isWeakSet() method 
console.log(_.isWeakSet(new WeakSet));

 Output:

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