Assuming this :
I want my answers to be a bit more general than this.
I think this is a little more general :
1. What does the if-condition do?
Checks the equality from the current object compared to the object passed.
2. What does the for loop do?
Loops through the
entire array
3.Assuming that the driver code compiles, explain what it is use is?
It's used to discover the index of an object if it's in the array.
And Campbell Ritchie is right,
you should take a look at indexOf() method.