zaagan
6/28/2019 - 12:02 PM

Simple While Loop.js

Simple While Loop.js

var i = 1;
while (i <= 5) {
    document.write(i + " | ");
    i += 1;
}

// Output :  1 | 2 | 3 | 4 | 5 |