How to remove all backslashes from a string in Node.js

1 Answer

0 votes
let str = 'node.js\\c\\java\\';

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

console.log(str);
    
    
    
    
/*
run:
    
node.jscjava
    
*/

 



answered Jul 2, 2022 by avibootz

Related questions

...