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

151
Vistas
Js includes returns incorrect result when searching an array of strings

Can someone explain why the includes function does not return true? The array of strings clearly has .. as does the search pattern. I checked the Mozilla JS docs and everything I am reading says it should return true as well.....Why is this returning false?

Just to rule out things Ive tested:

  • Thanks to a comment I tested the suggestion that .. might actually be falsey. It is not. The string .. evaluates to true: console.log('..'?'its true':'its falsey') return its true

let dbname=null
let tablename="x..y"
console.log([dbname, tablename].includes(".."))

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