But now your loop has one iteration too many as the first time into the loop the test necessarily fails.One extra comparison vs one call to shift? That isn't anything I'd lose any sleep over.
Premature optimization is the root of all evil
In reply to Re^3: Printing largest number in array using loops and if statement
by FunkyMonk
in thread Printing largest number in array using loops and if statement
by matze77
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |