Welcome to collectivesolver - Programming & Software Q&A with code examples. A website you can trust. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Powerful WordPress hosting for WordPress professionals

Instant Grammar Checker - Correct all grammar errors and enhance your writing

Aliexpress Today's Best Deals

Teach Your Child To Read

Disclosure: My content contains affiliate links.

28,263 questions

36,905 answers

573 users

How to check if a set contains an object in JavaScript

1 Answer

0 votes
const obj = {
  lang1: 'javascript',
  lang2: 'c',
  lang3: 'python',
};
 
const st = new Set([obj, {lang4: 'php'}]);

console.log(st.has(obj)); 
 
    
    
    
    
/*
run:
    
true
    
*/

 


Protect Your Privacy - Download VPN


answered May 14, 2022 by avibootz

Related questions

1 answer 26 views
1 answer 17 views
1 answer 18 views
1 answer 16 views
1 answer 12 views
...