Confusing explanation

Understand the Hazards of Using Imperative Code

This exercise mentions the use of .map() method, however in the solution you never mention .map(). The description of the exercise is confusing to say the least.

Why would you mention .map() and then not use it in the solution?

./rant-off

hello and welcome back to fcc forum :slight_smile:

could you please share that step url, as well, thanks and happy learning :slight_smile:

There are usually multiple possible solutions by this point in the curriculum

Hi,

I do apologize for the small fit, I came back after a long time and thought to pick up my learning again, only to find out I wil likely need to revist the whole Javascript course from the top to refresh my memory on certain topics :slight_smile:

Thank you.

It has nothing to do with the solution. It is explaining imperative vs declarative code using a for loop and map as the example. Which is a perfectly fine example to give. If you can use an array method and one exists that fits the task you should use an array method. It is declarative, reads nicer, and is less error-prone.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.