How to remove all occurrences of a character in a string with TypeScript

1 Answer

0 votes
let str = "typescript programming version 4.7.4";
  
str = str.replace(/s/g, 'K') 
  
console.log(str);
   
   
 
       
/*
run:
    
"typeKcript programming verKion 4.7.4" 
     
*/

 



answered Jun 30, 2022 by avibootz
...