Deconstruction solution incomplete

@JeremyLT that’s a good point. i’ll mention it to my colleague. he’s a pretty linear thinker (a touch on the spectrum methinks) and is trying hard to get up to speed on our projects. i’ll also have a word with our training officer. maybe she can help him pump the brakes a bit.


Welcome, Iansebryk.

Thank you, for taking the time to provide feedback about your experience with this lesson. It is useful to have, and perhaps there is conversation to be had about improving either, as you have mentioned, this lesson, or the lessons prior so that this one is not out-of-the-blue.

I will mention this: The curriculum is under an overhaul (almost always has been), and the current lessons and their structure are likely to become legacy (obsolete) with version 7 of the curriculum. There is no set date on this, but it is something to keep in mind. Read more here: Help us build Version 7.0 of the freeCodeCamp curriculum - Contributors - The freeCodeCamp Forum

If you want, I recommend heading over to the mentioned resources to help contribute to what is still available.

Thanks again.


I can definitely understand the impulse to rush and get up to speed on a project rapidly.

This section might be more useful to start with in that sort of situation. I’m still not quite sure why it’s not higher up in the list of sections.


i agree. debugging is something so few learn properly. it should be higher on the list, introduced earlier.

thanks for the patient feedback! :smiley:


@Sky020 you bet! thank you. i hope my underlying desire to improve content is evident. i’m not looking to troll but improve. :slight_smile:

1 Like

As a learner, I would like to add my own experiences with the deconstruction problem: It was the first and only challenge I did not solve myself and needed help. I will not claim that I have solved it with the function call console.log(half(stats)); but this line would have been helpful in retrospect.

Even if I do not have much knowledge in programming, I do have some adult education experience. I always tried to follow two maxims:

  1. Provide a learning environment that comes as close as possible to reality.
  2. Whenever possible, make all hidden assumptions transparent.

In my opinion, not including the functional call violates both maxims.

BTW: I found the defense for not including this line strange because I am missing an argument why NOT including this line.


all the challenges have been uniformed to not include function calls in the editor, and as less as possible of other stuff, probably this one like others could also not include the object in the editor but in the description - learners tend to focus too much on global objects instead on having the function being able to do everything, and rely instead on the function parameters. It’s a thing in progress.

I admit, the previous version of the challenge did had that… I think it was my first question on the fourm, or around there - how are the function and the object connected?
I think it’s just really confusing, at a point in which you are starting to familiarise with functions and all the other ES6 stuff, and boom, destructuring, which kind of fry your brain even more


Agreed. Having the learner make the leap from seeing that the function they wrote working for the global object and single function call they see in the editor to having the learner understand that functions are reusable entities that do not rely upon their inputs existing on the same screen at the same time seems to be a big stumbling block for some. In real production code, you often have function calls in separate files from the function definition, so learners need to eventually understand that a function can exist and be correct without being called in the same file.

Issues understanding scope and independence of function calls seems to especially come out of the recursion lessons all the time. The abstraction that a function is a separate logical entity and each function call is a separate entity is hard for some people to get used to.

1 Like

I see. This was helpful for me and countered my first maxim as it is obviously a reality that “a function can exist and be correct without being called in the same file.” I didn’t think about that.

But still: Is it pedagogically advisable to explain/teach a new and difficult to understand feature embedded into another complexity? The lesson aims to understand “Destructuring Assignment to Pass an Object as a Function’s Parameters” and not to “understand that a function can exist and be correct without being called in the same file.”

I agree that it is useful and important for raising the level of proficiency to combine different taught concepts into challenges. But after a new taught concept is studied on its own and understood.


Maybe? Somehow we have students this deep into the curriculum who are not understanding that functions exist independent from what similar global variables exist or if the function being called. That is a concept that should be understood by now. This should not be a new idea at this point. And by this point the learner should know how to add function calls and console logs to interact with their function.

What’s the best way to set up this lesson and the entire curriculum? I don’t know. But I’m confused at students not knowing how to add log statements and experiment with the code this far along.

Luckily, we do have the forum to answer any questions that come up. Learning how to ask questions is a big step is becoming a programmer.


I believe I understand our different assessments of the problem. I do not have your broader perspective and experiences with other students. I just wanted to contribute ideas and thoughts about the educational structure of this one challenge.


Yeah, different ideas and perspectives are definitely helpful. You’ve added more information to a problem I don’t yet know how to solve, which is great.


Thanks! it makes it easier to understand!

1 Like

A post was split to a new topic: JavaScript Object Deconstruction in Function Parameter

Please do not post random solutions in topics.

A new user when being introduced to the ideas of deconstruction could jump to the conclusion that all objects in the memory are unpacked by the deconstruction function to find the declared parameters.


I don’t understand what you are trying to say.

1 Like

3 posts were split to a new topic: Code in Comment Possibly Detected

A post was merged into an existing topic: Code in Comment Possibly Detected