i have a string :
var s="here_we_go";
how can i replace all occurrence of '_' by '$' so the string will become:
s="here$we$go";
i have a string :
var s="here_we_go";
how can i replace all occurrence of '_' by '$' so the string will become:
s="here$we$go";
s.replace(/_/g, '$');
The g here ensures every (not just one) occurrences of _ will be replaced by $.