How to remove all backslashes from a string in TypeScript

1 Answer

0 votes
let str = 'typescript\\c\\php\\';

str = str.replaceAll('\\', '');

console.log(str);
    
    
    
    
/*
run:
    
"typescriptcphp" 
    
*/

 



answered Jul 2, 2022 by avibootz
...