Answers for "email address hide characters"

0

email address hide characters

function hideemail(target) {
  var email = target //[email protected]
  var hiddenEmail = "";
  for (i = 0; i < email.length; i++) {
    if (i > 2 && i< email.indexOf("@") ) {
      hiddenEmail += "*";
    } else {
      hiddenEmail += email[i];
    }
  }
  console.log(hiddenEmail) //an.*******@gmail.com
}
Posted by: Guest on April-20-2021

Browse Popular Code Answers by Language