Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created July 18, 2019 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/8d381d2b0f46a40e9cceca771772c2ca to your computer and use it in GitHub Desktop.
Save parzibyte/8d381d2b0f46a40e9cceca771772c2ca to your computer and use it in GitHub Desktop.
const esCorreoElectronico = correoElectronico => /\S+@\S+/.test(correoElectronico);
const correosParaProbar = ["foo@bar.baz", "HolaMundo@ejemplo.com", "ejemplo@asd.com", "mark@facebook.com", "pedro@gmail.com", "asd", "123"];
correosParaProbar.forEach(correo => {
console.log("¿El correo %s es válido? %s", correo, esCorreoElectronico(correo));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment