Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

125
Vistas
firebase auth.currentUser.email error/bug?

clearly (jimmy22@mail.com === "benjamin@icloud.com" || "lame@mail.com") should return false

so why is it printing "email in first : jimmy22@mail.com"

when it should print "email was : jimmy22@mail.com"

code below

let email = auth.currentUser.email


if(email === "benjamin@icloud.com" || "lame@mail.com") {
    alert("email in first : " + auth.currentUser.email )
    checkUserIsNotAlreadyInGame() 
    return
        } else {
            alert("email was :" + auth.currentUser.email )
            return
        }

prints "email in first : jimmy22@mail.com"

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

your expression will always evaluate to true because it falls to the "lame@mail.com" string which always evaluates to true in the condition.

change your condition to the following:

if(email === "benjamin@icloud.com" || email === "lame@mail.com")

then you'd get the expected result

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda