jquery remove string from string

JavaScript
myString.replace('username1','');
Source

Also in JavaScript: