For, while, do-while bench

For, while, do-while bench

Go to Source

See the Code
See it Full Page
See Details

Once upon a time there's a duck.

Then, about this demo:
It will vary between browser types, machines, and platforms.
Each loop block will run after the earlier one has finished.

Anyway, [for] is the fastest, usually, but not all the time.
[while] and [do-while] are flexible for lots of statements/functions. But then again, it depends on.
Swamp Things.

Aside the fluctuated results, we can always translate [while] or [do-while] into [for] or vice verse uh.
Either one can be faster than the other for certain environments and tasks. It's really about the browser (compiler), the background tasks, , …, donuts, pencils, voltage, chips, and many others.

The duck smashed the truck.
And they live happily ever later.

Added some things at: http://thor.johanpaul.net/JSloop

This Pen uses: HTML, CSS, JavaScript, and