It's honestly just preference! If you want to be pedantic, then my way is less work: the while (...) loop checks downloadIsDone even though we know it's false already, but this is splitting hairs.
FWIW, I write a lot of Go, which has a "naked" for loop: for { ... }, which I quite like—it's just the same as using (;;) in the body of a JS for loop.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It's honestly just preference! If you want to be pedantic, then my way is less work: the
while (...)
loop checksdownloadIsDone
even though we know it's false already, but this is splitting hairs.FWIW, I write a lot of Go, which has a "naked" for loop:
for { ... }
, which I quite like—it's just the same as using(;;)
in the body of a JS for loop.