How to check if a set contains a value in Node.js

1 Answer

0 votes
const st = new Set(['javascript', 'typescript', 'node.js', 'c++', 'python']);

console.log(st.has('node.js')); 

console.log(st.has('java'));




/*
run:
 
true 
false 
  
*/
  

 



answered Jun 2, 2022 by avibootz
...