Loop Over an Object

Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.

The problem

  • easy
  • Pro

You have an object mapping product names to stock counts and you need to list every product with its count, and the total stock. Explain the ways to loop over an object, and which you'd choose.

Talk this problem through with an AI coach

This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.

Start free →