how replace a character in a string in javascript

Posted by nana on Stack Overflow See other posts from Stack Overflow or by nana
Published on 2010-05-27T06:53:40Z Indexed on 2010/05/27 7:01 UTC
Read the original article Hit count: 173

Filed under:

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";

© Stack Overflow or respective owner

Related posts about JavaScript