In the JSX lesson you emphasize the .map() method saying how it is often used and how important it is to have a good understanding of it. Then in the project you tell us to use forEach(). Such terrible curriculum and assessment design.
The project is not in any way an extension of the lesson. We are asked to use the iterator that does the job. .map()
returns an array mapping whereas .forEach()
executes code on an arrayâs elements. There will be plenty of opportunity to use .map()
in the future. At this point just feeling comfortable with the range of iterators at our disposal is the optimum goal.
In the same vein, we havenât yet been exposed to the concept of an event target, but expected to know the syntax e.target
. And in general, not getting console errors made this particularly hard to debug. Overall a pretty frustrating exercise.
Then itâs quite possible you jumped straight into React.js without taking the Learn JavaScript track. Put React on hold and return when youâve got JS basics under your belt.
I did complete the JavaScript course. The event listener wasnât covered.
P.S. The quiz right after this exercise asks about DOM render order and differences between virtual and and non-virtual DOM. Also not yet covered.
Did you also complete the HTML and CSS tracks? The âChore Doorâ project goes into events and event handlers.
Is âChore Doorâ part of HTML or CSS courses?
Aside: consistent terminology avoids additional confusion. Are you referring to what the website calls âcoursesâ as âtracksâ, or is that something else?
It uses HTML, CSS and JavaScript, so must be in one of those tracks (course modules). I donât remember exactly where it is but check the syllabus and it should turn up in there somewhere.
And the quiz? Right now itâs asking me what the virtual DOM attempts to solve, which was not covered yet in this course, but is now a question in this course.
It does cover it though. In the first lesson named âIntro to JSXâ, exercise 14 named âThe Virtual DOMâ ends with the following:
React accomplishes this thanks to something called the virtual DOM. Before moving on to the end of the lesson, read this article about the Virtual DOM.
That link is to an article prepared by Codecademy about that subject.
Ahh, I see. I guess I didnât read it because clicking on links in courses doesnât do anything, at least not on my machine.