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

240
Vistas
javascript: a question about reference values. Why is this a different reference?

I was doing a quiz on educative and am truly stumped by this question. Can someone explain to me why this is a different reference:

What will this print out?

const obj = {
arr: []
};

obj.arr.push(17);

console.log(obj.arr === [17]);

Your Answer A) true

Correct Answer Explanation: They are different references! B) false


Why? How? I am really frustrated by this. I read through the material again but it still makes no sense. I thought I understood everything fine until I got to this. I console logged obj.arr and its value was indeed [17], so why on earth would the statement evaluate to false?

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