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

156
Views
¿Cuál es una forma más limpia de escribir esta declaración javascript if?

He probado el formato como

 ['mobile-number', 'name', 'about'].includes(stages)

Pero eso no parece funcionar.

 if (stages.includes('mobile-number') || stages.includes('name') || stages.includes('about')) { array.push('about-you') }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Estás buscando Array.prototype.some

 stages.some(s => ['mobile-number', 'name', 'about'].includes(s))

Esta es la alternativa exacta de las stages.includes('mobile-number') || stages.includes('name') || stages.includes('about')

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