Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Array Iteration Methods Combining Array Methods Nested Data

Samuel Fortunato
Samuel Fortunato
20,229 Points

Was able to complete the challenge by setting the 'hobbies' variable to a single object's 'hobbies' property

Was SERIOUSLY stuck on this one. In fact, I still don't know how to do it. But I was able to "trick" the task by typing this:

hobbies = customers[0].personal.hobbies;

Didn't use reduce, and hobbies doesn't equal what it's supposed to. A bug, yeah?

Also, can I have my progress removed on this challenge? I didn't complete the challenge legitimately (on accident). I feel dirty.

app.js
const customers = [
  {
    name: "Tyrone",
    personal: {
      age: 33,
      hobbies: ["Bicycling", "Camping"]
    }
  },
  {
    name: "Elizabeth",
    personal: {
      age: 25,
      hobbies: ["Guitar", "Reading", "Gardening"]
    }
  },
  {
    name: "Penny",
    personal: {
      age: 36,
      hobbies: ["Comics", "Chess", "Legos"]
    }
  }
];
let hobbies;

// hobbies should be: ["Bicycling", "Camping", "Guitar", "Reading", "Gardening", "Comics", "Chess", "Legos"]
// Write your code below

1 Answer

Steven Parker
Steven Parker
216,148 Points

That sure sounds like a bug to me. I suggest you report it to the Support folks, who are also the only people who can reset progress.

But you could also just pass the challenge legitimately and be "square".