title: Iterating through an array and checking each item, printing error if no match
body: <p>I have a for loop set up that iterates through each item in an array of objects. I have an if statement that checks to see if the values in a certain item matches a specific string value. If it does, I want to print that to the screen. I have no problem doing this. However, if the loop makes it all the way through without finding a match, I want the program to print an error message. The way I have it set up now as an if else statement, the program is printing an error message for each item if it does not match. I can't figure out a way to only do that once the loop has finished. Any guidance would be much appreciated.</p>