i=1e300;for(;;i-->0){while(i&&alert('foo'));}
- define
i
in the loop - use the
var
keyword to define variables (or let, when usingfor
loop iterator variables) i-->0
i
is not how you make an ascii bow in javascript,D
works better:D-->
D -->0
(but seriously, write it properly. same effect)while(i&&alert('foo')
wouldn't this be slimmer if you put thealert
in the loop?while(i)alert('foo')