How to convert all values in a set to lowercase with TypeScript

1 Answer

0 votes
const st = new Set(['TYPESCRIPT', 'JAVASCRIPT', 'NODE.JS', 'C++', 'C']);

const newset = new Set();

st.forEach(value => {
  	newset.add(value.toLowerCase());
});

console.log([...newset].join(' '));



  
  
/*
run:

"typescript javascript node.js c++ c" 

*/

 



answered Apr 14, 2022 by avibootz
...