Search
We can add an if condition within the for loop to execute statements if they match a particular condition.
The example above checks if a name ends with Cooper and prints them to the screen.