Skip to main content
se añadió 1 carácter en el cuerpo
Origen Enlace

Podría servir:

const mailOne = '[email protected]'
const mailTwo = '@foobar'foo@bar.com'comx'

const listMailOne = mailOne.split(".")
const listMailTwo = mailTwo.split(".")

console.log(mailOne + " is:", listMailOne.pop().length < 4)
console.log(mailTwo + " is:", listMailTwo.pop().length < 4)

Podría servir:

const mailOne = '[email protected]'
const mailTwo = '@foobar.com'

const listMailOne = mailOne.split(".")
const listMailTwo = mailTwo.split(".")

console.log(mailOne + " is:", listMailOne.pop().length < 4)
console.log(mailTwo + " is:", listMailTwo.pop().length < 4)

Podría servir:

const mailOne = '[email protected]'
const mailTwo = 'foo@bar.comx'

const listMailOne = mailOne.split(".")
const listMailTwo = mailTwo.split(".")

console.log(mailOne + " is:", listMailOne.pop().length < 4)
console.log(mailTwo + " is:", listMailTwo.pop().length < 4)

Si usas "@foobar.com" da como resultado TRUE lo cual es incorrecto. =(
Origen Enlace
Jorgesys
  • 111.1k
  • 14
  • 55
  • 134

Podría servir:

const mailOne = '[email protected]'
const mailTwo = 'foo@bar'@foobar.comx'com'

const listMailOne = mailOne.split(".")
const listMailTwo = mailTwo.split(".")

console.log(mailOne + " is:", listMailOne.pop().length < 4)
console.log(mailTwo + " is:", listMailTwo.pop().length < 4)

Podría servir:

const mailOne = '[email protected]'
const mailTwo = 'foo@bar.comx'

const listMailOne = mailOne.split(".")
const listMailTwo = mailTwo.split(".")

console.log(mailOne + " is:", listMailOne.pop().length < 4)
console.log(mailTwo + " is:", listMailTwo.pop().length < 4)

Podría servir:

const mailOne = '[email protected]'
const mailTwo = '@foobar.com'

const listMailOne = mailOne.split(".")
const listMailTwo = mailTwo.split(".")

console.log(mailOne + " is:", listMailOne.pop().length < 4)
console.log(mailTwo + " is:", listMailTwo.pop().length < 4)

se eliminaron 14 caracteres en el cuerpo
Origen Enlace

Podría servir:

const mailOne = '[email protected]'
const mailTwo = '[email protected]'

const listMailOne = mailOne.split(".")
const listMailTwo = mailTwo.split(".")

console.log(mailOne + " is:", listMailOne[listMailOnelistMailOne.length-1]pop().length < 4)
console.log(mailTwo + " is:", listMailTwo[listMailTwolistMailTwo.length-1]pop().length < 4)

Podría servir:

const mailOne = '[email protected]'
const mailTwo = '[email protected]'

const listMailOne = mailOne.split(".")
const listMailTwo = mailTwo.split(".")

console.log(mailOne, listMailOne[listMailOne.length-1].length < 4)
console.log(mailTwo, listMailTwo[listMailTwo.length-1].length < 4)

Podría servir:

const mailOne = '[email protected]'
const mailTwo = '[email protected]'

const listMailOne = mailOne.split(".")
const listMailTwo = mailTwo.split(".")

console.log(mailOne + " is:", listMailOne.pop().length < 4)
console.log(mailTwo + " is:", listMailTwo.pop().length < 4)

Origen Enlace
Loading