Hello, can someone explain this to me?
In video 2.13 we had this code:
the problem with it was that before "return" command executed, we had our variable "i" go through a "for loop" until it was equal to "passenger.Array.length", so our alert message was incorrect.
But was is the difference between the example in this video and the suggested solution? As I understand, our "for loop" doesn't stop after we found the "Ice Teeth" shark, and "i" variable goes all the way to "shark.length". Shouldn't we stop the "for loop" after we located our shark?