🔥 Get 650+ Tech Books and Courses for $3/m for 3 months

jQuery replace all characters with asterisks

Sam Deering
Share

Use JavaScript to replace all characters with asterisks.

//iVal is your string of characters (with asterisks).
iVal = iVal.substr(i).replace(/[S]/g, "*");