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

221
Views
¿Existe una forma más corta e inteligente de manejar una larga lista de condiciones en una declaración if?

Por ejemplo: tengo una cuadrícula donde cada cuadrado se identifica con un valor que indica fila y columna, por ejemplo: 32 está en la 3.ª columna y en la 2.ª fila. Las ubicaciones cercanas serían los cuadrados 31, 33, 41, 42, 43, 21, 22, 23.

 if (main.location === player.location - 1 || main.location === player.location + 1 || main.location === player.location - 9 || main.location === player.location + 9 || main.location === player.location - 10 || main.location === player.location + 10 || main.location === player.location - 11 || main.location === player.location + 11) { console.log("player is nearby"); }
about 4 years ago · Santiago Gelvez
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!