How to remove the first occurrence of a character in a string with JavaScript

1 Answer

0 votes
var s = "javascript programming version 6";

s = s.replace('p', '');

document.write(s);
 
     
/*
run:
  
javascrit programming version 6 
   
*/

 



answered Feb 2, 2019 by avibootz
...