Double semicolons syntax in javascript

前端 未结 2 787
抹茶落季
抹茶落季 2021-01-12 06:54

Can someone tell me what double semicolons (;;) in javascript means? I see them in fullcalendar.js.

Thanks.

Here\'s a snippet of the fullcalendar.js code (ta

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-12 07:09

    Empty “for” loop
    

    for(;;){...} is the same as saying while(1){...}

    for(;;) jumps out to mean "infinite loop" more readily than while(1)

    facebook's AJAX responses all start with an empty for loop.

提交回复
热议问题