How to replace all underscores with spaces in a string with Node.js

1 Answer

0 votes
let str = 'node.js_java_c_c++_php';

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

console.log(str); 

   
   
   
   
/*
run:
   
node.js java c c++ php
   
*/

 



answered Apr 25, 2022 by avibootz
...