If statements within an array of digits

Thank you. That did it!