Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

234
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda