Common JavaScript Manual/Do .. While and For .. in loops

Do .. While
In this cycle, executing the code in it and then check the condition and if it is true then the loop is executed again, otherwise terminate the loop. Let's see example. Do .. while loop can be used if code inside a loop set some values and in condition you call some function.

For .. in
For .. in loop using if need iterate over all properties of object. For example. In this code on every iteration to variable 'i' set value with key of property.