while loop to print 1 to 10 in javascript in column code example Example: javascript while loop while (i < 10) { text += "The number is " + i; i++; }