//replaces the first occurence only.
string.replace('characterToReplace', '');
or
// first parameter is regular expression and g isglobal prop, replaces all occurences.
string.replace('/regex/g','');
var str = "qwertyXuiop";
// We will remove the uppercase X from qwertyuiop,// You can also use Regular Expressions, if you wishvar rm = str.replace('X', '');
// Check itconsole.log(rm);