What does it mean when the first “for” parameter is blank?

后端 未结 8 1108
猫巷女王i
猫巷女王i 2020-12-20 19:27

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          


        
8条回答
  •  长情又很酷
    2020-12-20 19:54

    It means that the initial value of hole was set before we got to the loop.

    Looks like a list traversal of some kind.

提交回复
热议问题