Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

238
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!