Been up for 30+ hours.. i'm so tired and not thinking correctly. All i'm doing is replacing each char in the string with an asterisk. Is there an easier way, or better way? What i have works but i feel that maybe a regex isn't necessary.
var word = "Chowder"; // Normally dynamic but for this sake, static.
word = word.replace(/./g, "*");
// To test
console.log(word);
// Output: *******
Been up for 30+ hours.. i'm so tired and not thinking correctly. All i'm doing is replacing each char in the string with an asterisk. Is there an easier way, or better way? What i have works but i feel that maybe a regex isn't necessary.
Perhaps just check the length of the string and then just write out that number of asterisks?
@senff,
Possibly, thanks for the logic. Ill try that and re-post..
@mmoustafa,
BOSS! Thanks man..