Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

223
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!