How to remove the underscores from a string in JavaScript

1 Answer

0 votes
let str = 'javascript_c_c++_php';

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

console.log(str);

  
  
  
  
/*
run:
  
"javascriptcc++php"
  
*/

 



answered Apr 27, 2022 by avibootz
...