I've looked up this question but am new to coding so I'm not quite able to relate other answers to this.
Given a string s, return a string
where all occurrences of its first char have
been changed to '*', except do not change
the first char itself.
e.g. 'babble' yields 'ba**le'
Assume that the string is length 1 or more.
Hint: s.replace(stra, strb) returns a version of string s
where all instances of stra have been replaced by strb.
This is what I have, but this does not replace every character after except the first, it just replaces the next character.
function fixStart(s)
{
var c = s.charAt(0);
return c + s.slice(1).replace(c, '*');
}