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

226
Vistas
How does the syntax of the OR comparison operator || work in JS?

I have a code snippet below which i'm trying to find if a field has a value of 90 or not. I've tried it with only the one field and it works fine but when I add the other two in with ORs all of them don't work:

The working script:

if (number1 === "90") {
    message = "Right angle";
} 

The not working script:

if (number1 || number2 || number3 === "90") {
    message = "Right angle";
} 

On the bottom code snippet the term "right angle" is returned for any value

about 4 years ago · Juan Pablo Isaza
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