Introduction
You use forEach to go through each item in a list or collection easily, doing something with each item without writing a loop yourself.
When you want to print all items in a list one by one.
When you need to apply the same action to every element, like increasing numbers or changing text.
When you want to check or process each item without changing the list itself.
When you want cleaner and simpler code instead of writing a full loop.
When you want to run a small piece of code for each item quickly.