Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

149
Vistas
'Else If' NOT working when 'If' is False - some.(value)

The goal is to check a URL or Cookie for the given set of values, and if not found; move to the If Else statement where language is verified. Everything works fine when the initial IF statement is removed. However, when like this; the else if is not reached

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';
}

It is likely I have a misunderstanding of some.(value). Then again, the IF statement is working perfectly.. However the else if is never engaged when IF is false

I have tried changing "else if" to just "if" and it still does not work

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda