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

139
Vistas
Why the empty object { } and the empty array [ ] aren’t falsy, how they are truthy, by definition

ref:https://medium.com/coding-at-dawn/what-are-falsy-values-in-javascript-ca0faa34feb4 by Dr. Derek Austin

Since I have started my development career with JavaScript this question always arise in mind how??

Truthy values include the empty object {} and the empty array [] — since they aren’t falsy, they are truthy, by definition.

let empty = []
empty ? console.log("truthy") : console.log("falsy") // truthy
empty = {}
empty ? console.log("truthy") : console.log("falsy") // truthy

where,

"" ? console.log("truthy") : console.log("falsy") // falsy
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