Update: Er. Whoops!
No. Without the last statement, the loop would iterate twice more ('cat' & 'dog') than it needs to. For such a small dataset as shown, the difference is minimal, but if the dataset were large, and the key found early, then a significant saving results by short circuiting the loop.
In reply to Re: Is 'last' redundant?
by BrowserUk
in thread Is 'last' redundant in this code?
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |