Unit 5 '20-'21 "For each" loop?

I can’t seem to see the ‘for each’ loop covered. Just wanted to confirm that just ‘for’ loops are covered in code.org CS-P. Or, could you tell me where ‘for each’ loops are covered? Thank you

The For and while loops are the second EIPM cycle in unit 5!

1 Like

I don’t recall for each being covered.

1 Like

Everyone seems to be correct, as ‘for’ loops are covered in Unit 5, but ‘for each’ loops do not seem to be explicitly taught in the code.org curriculum (but is in the framework, as evidenced by the ‘for each’ block in the pseudocode and EK AAP 2.0.3)

‘For each’ does get a mention in the form of a Check For Understanding at the end of Unit 5 Lesson 11. I’m not sure why ‘for each’ is not specifically taught in the curriculum, but I believe this was also the case for the previous curriculum - and also the case that the curriculum did give students ‘for each’ practice problems so they were at least exposed to the concept and got practice. I notice AppLab doesn’t have a ‘for each’ code block, maybe part of the reason it’s not explicitly covered in a lesson.

1 Like

Thanks for all the responses. I checked Khan Academy and noticed something: they use Javascript in their review of the traditional ‘for’ loop to iterate over lists. But they switch to pseudocode when discussing the ‘for each’ loop. So, then I was curious if Javascript even has a ‘for each’ loop and, from what W3 schools has (https://www.w3schools.com/jsref/jsref_foreach.asp) it appears to be a whole different beast - calls a function for each iteration. Cool, but different.

Anyway, thanks all - now I think I see what’s going on here