I'm messing around with the "Arrays for Beginners" tutorial and I'm at the section where I create a button to add "cow" into the array. I've got it so that all the values of the array are displayed, so every time that button is pressed, the word "cow" shows up.
How do I prevent the button from working if "cow" is already in the array?
Here is the relevant line of code:
Here is the output when I press the button more than once: