let i = 0; while (i < 3) { console.log(i) i++; } /* Console: 0 1 2 */
var text = ""; var i = 0; do { text += "The number is " + i; i++; } while (i < 5);
do { //whatever } while (conditional);
while (i < 10) { text += "The number is " + i; i++; }