Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

143
Visualizações
'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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda