Regarding JavaScript for() loop voodoo

前端 未结 9 1428
梦如初夏
梦如初夏 2021-02-19 08:53

I was for quite some time under the impression that a for loop could exist solely in the following format:

for (INITIALIZER; STOP CONDITION         


        
9条回答
  •  名媛妹妹
    2021-02-19 09:50

    this goes all the way back to C syntax - from which javascript has stole a bunch. the main trick is the comma-operator which seems to appear in almost no other place except for loops

提交回复
热议问题