From for
MDN
for ([initialization]; [condition]; [final-expression])
statement
[Initialization]
and [final-expression]
are intuitively not required, reducing the construct to a simple while
loop. But the relevant part is:
condition
An expression to be evaluated before each loop iteration. If this expression evaluates to true, statement is executed. This conditional test is optional. If omitted, the condition always evaluates to true. If the expression evaluates to false, execution skips to the first expression following the for construct.
(emphasis mine)
This appears to be a totally arbitrary JS language design decision. If it were my language I would probably throw a syntax error.
On a playful side note, for(;;){}
is equivalent to while(true){}
, and happens to be 4 characters shorter. I wonder if minifiers leverage this!