Basic JavaScript tips

Replace a string javascript