Edit in JSFiddle

var myString = "He's an ahole. Can't believe how much of a jackass he can be!";

//Replace each letter in 'ahole' and 'jackass' with *
var updateMyString = myString.replace(/ahole|jackass/g, function (s) {
    return [].map.call(s,function(){return '*'}).join('');
    //or crazy cool
    //return Array(s.length+1).join('*');
});

console.log(updateMyString);
/*logs

He's an *****. Can't believe how much of a ******* he can be!

*/