Ad

Validate your mobile pi here!!!

function pinValidator(pin) {
  var pinLength = pin.length;
  var pinIsCorrect = (pinLength === 4 || pinLength === 6);
  var onlyNumbers = pin.match (/^\d+$/);
  if (pinIsCorrect && onlyNumbers){
  return true;
  console.log("TRUE");
  }
  else {
  return false;
  console.log("FALSE");
  }
};
pinValidator('88888');