Congratulations, you made it to the end of the course! The night-bus report now runs in JavaScript, from the numbered late departures to each route’s supervisor. The quiz asked you to spot what goes wrong in loops like these, even when JavaScript says nothing.
In this course, you learned how to:
- Loop over an array’s items with
for...of, and tell it apart fromfor...in - Count without
range()using the classicforloop and aletcounter - Loop with
whileanddo...while, and search with.find()instead offor...else - Loop over positions with
.entries(), pair arrays withoutzip(), and walk objects and Maps - Spot a Python habit in a JavaScript loop, whether you or an AI assistant wrote it
Every trap in this course was a Python habit carried into JavaScript. Some stop with an error, but the worst ones run without one and give the wrong answer, like the 0012 total from for...in. You can spot those habits the same way in code an AI assistant suggests.