Re: [jslint] Loop
- Douglas Crockford <douglas@...> wrote on Tue, 14 Jun 2011
at 17:53:41 -0000 in <it8775+kvdj@...>:
> But it doesn't, so instead of writing loop I must write either whilefor(;;) is quite potentially confusing to novice programmers.
> (true) or for (;;). I don't like either, so I am not sure which one
> to prefer.
while(true) is much clearer.
I hope we're not discussing what JSLint should complain about though,
since both are legitimate stylistic choices that are unambiguous and not
Erik Eckhardt <erik@...> wrote on Tue, 14 Jun 2011
at 11:25:39 -0700 in <BANLkTik0xdFw16bCvxAOF7HLTuHmjjfXLQ@...>:
> So perhaps a second, optional parameter to while, whose use would make theErr, it's not as if we are changing the language.
> first parameter a loop initializer that runs before each loop before the
> condition is tested: