I have been looking through some code and I have seen several examples where the first element of a for cycle is omitted.
An example:
for ( ; hole*2
The for
construct is basically ( pre-loop initialisation; loop termination test; end of loop iteration)
, so this just means there is no initialisation of anything in this for loop.
You could refactor any for
loop thusly:
pre-loop initialisation
while (loop termination test) {
...
end of loop iteration
}