Question: What will be the result of the following `do...while` loop?
<pre>
<code>var i = 0;</code>
<code>do {</code>
<code>console.log(i);i++;</code>
<code>} while (i < 5);</code>
</pre>
Answer:
The `do...while` loop will iterate from 0 to 4 and log each value.
MCQ: What will be the result of the following `do...while` loop?
<pre>
<code>var i = 0;</code>
<code>do {</code>
<code>console.log(i);i++;</code>
<code>} while (i < 5);</code>
</pre>
Correct Answer:A. 0, 1, 2, 3, 4 will be logged
Explanation:
The `do...while` loop will iterate from 0 to 4 and log each value.