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

142
Views
'Else If' NO funciona cuando 'If' es False - some.(value)

El objetivo es verificar una URL o Cookie para el conjunto de valores dado y, si no se encuentra; pasar a la declaración If Else donde se verifica el idioma. Todo funciona bien cuando se elimina la instrucción IF inicial. Sin embargo, cuando así; lo demás si no se alcanza

 if (["ccov", "top10", "cenf", "aip", "constructioncoverage", "seniorliving", "aginginplace", "seniorlist"].some((value) => ref1.includes(value)) || ["ccov", "top10", "cenf", "aip"].some((value2) => getcookie('track-page-1').includes(value2))) { s1.src = 'https://embed.tawk.to/620675459bd1f31184dc28c0/1frkjk5mj'; } else if (userLang.match(/^en/)) { s1.src = 'https://embed.tawk.to/60a7b623b1d5182476bb3457/1f67huun6'; }

Es probable que tenga un malentendido de some.(value) . Por otra parte, la instrucción IF funciona perfectamente. Sin embargo, el else if nunca se activa cuando IF es falso

He intentado cambiar "else if" por solo "if" y sigue sin funcionar

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!