Introduction
A for-in loop helps you go through each item in a group one by one. It makes repeating actions easy and clear.
When you want to print every name in a list of friends.
When you need to add up all numbers in a collection.
When you want to check each item in a shopping cart.
When you want to change or use every element in an array or dictionary.