Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Welcome to the Night-Bus Report

JavaScript’s loops look familiar to a Python programmer, and that’s the trouble: loops are where Python habits trip you up, often without an error. Port Python’s for delay in delays: to JavaScript, keep the word in, and JavaScript prints the positions 0, 1, and 2 instead of the delays.

In this course, you’ll port a night-bus operations team’s morning report from Python to JavaScript, one loop at a time.

By the end of this course, you’ll be able to:

  • Loop over items with for...of, and tell it apart from for...in
  • Count without range() using the classic for loop
  • Loop with while and do...while, and search without for...else
  • Loop over positions, pairs, objects, and Maps
  • Spot a Python habit in a JavaScript loop, whether you or an AI assistant wrote it

You’ll need Python loops, enumerate(), zip(), and looping over a dictionary, plus Node 26 and the JavaScript basics: const and let, arrays, and objects. The Python examples use Python 3.15.

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Become a Member to join the conversation.