I am trying to replace characters within an array of strings.
so far i have this:
stuff= ["uyuuyu", "76gyuhj***", "uiyghj", "56tyg", "juijjujh***"];
for(var i = 0; i < stuff.length; i++)
{
if(stuff[i].indexOf('***') != -1)
{
// this is where i guess the replacing would go
}
}
I figured out that i can use this code to display with element in the array has the characters *** now want to replace the *** characters with a number so that it outputs a new array ( the same array but modified) that looks like :
stuff= ["uyuuyu", "76gyuhj0", "uiyghj", "56tyg", "juijjujh0"];
I can't seem to figure out how to replace the characters within that array without effecting the rest of the array
stuff.map( x => x.replace('***','0'))