Answers for "show only three caraters email javascript"

0

show only three caraters email javascript

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];
    }
  }
  return hiddenEmail; //an.*******@gmail.com
}
Posted by: Guest on April-20-2021

Code answers related to "show only three caraters email javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language