What is a foreach loop?

Very similar to a for loop, but the declaration is different. We create a var named item and we search inside the array of itemName. To do that, we write it like this:

We can then do an if statement inside and do a simple search — look inside item for this particular item.

They are identical to for loops, but with a cleaner sintax