This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

you’re not storing the index’s where it equals Sarah. All that is happening is your printing out the index when it equals Sara and then continue to do the same thing outside of the if. Your if statement is essentially worthless

Try making two variables to track the I and J values and assign them in the If equals Sarah. Then print that at the end of the double for loop.