How to print the use of different characters (letters) in a string in TypeScript

1 Answer

0 votes
const str: string = "typescript programming language";

console.log(([...new Set(str)]).join(''))



/*
run:
   
"typescri ogamnlu" 
   
*/

 



answered Jan 25, 2024 by avibootz
...