curriculum
curriculum copied to clipboard
Clean Code: Example uses Array.forEach() before arrays are introduced
Checks
- [X] This is not a duplicate of an existing issue (please have a look through our open issues list to make sure)
- [X] I have thoroughly read and understand The Odin Project Contributing Guide
- [ ] Would you like to work on this issue?
Describe your suggestion
In the first set of examples of the What is clean code section of the Clean code lesson TOP uses this example:
const sumArray = function (array) {
let sum = 0;
array.forEach(function (number) {
sum += number;
});
return sum;
};
sumArray([2, 2, 2]);
Arrays (and loops) however, are not covered until two lessons later; the learner who is following the curriculum would at this point have no way to understand what this code is doing. The example should probably just be rewritten to convey the same point using code already taught
Path
Foundations
Lesson Url
https://www.theodinproject.com/lessons/foundations-clean-code
(Optional) Discord Name
asarta
(Optional) Additional Comments
No response
Edit: Self-assigning as Asarta has not specified they wish to work on this and no one has responded for 2 weeks.
~~If Asarta doesn't want to work on this, given no one's responded for 2 weeks, I'll happily work on it if approved for assignment.~~
I can work on this if you don't have time.
Was actually waiting for a style guide PR to be merged to make things a little easier, seems it was merged the other day. I ended up taking on a bit of a longer mundane task right now, so sure thing I'll hand this over to you @cakegod Much appreciated :+1: