im trying to find if there is any javascript to format a string for display, so for exam “1234”- or any string over length 2- would become 12** i know there is a replace method but not sure how this would work. any suggestions welcome. thanks much
Share
Assuming you want to mask the equivalent number of characters you can replicate *
length - 2times & append the 1st 2 characters of the original string;