JavaScript string replace

string.replace(substr, newSubstr);