How can I repeat a letter or character for example "A" an X amount of times based on a string length number in Javascript? For example, user inputs the word "Outrageous" which has 10 letters and I want to output a * for each letter counted on from the input.
I tried this:
document.write("Your password " + str.replace(password.length),"*") + "has been accepted");
but it doesn't work