JavaScript loop with output: 0, 1, 10, 11, 12, 2, 3, 4, 5
<p>I saw an output of a loop that make the result: 0, 1, 10, 11, 12, 2, 3, 4, 5, etc.</p>

<p>I know the above loop is wrong and unusual and maybe you ask what's the usage of this loop, but i want to know how can i implement that.</p>

<p>Thanks</p>