How many times will this program print "hello"?
var i = 50;
while (i < 100) {
println("hello");
}
JavaScript
0
50
100
This code will loop infinitely
1 answer
This code will loop infinitely. The condition of the while loop (i < 100) is always true and there is no instruction within the loop that modifies the value of "i". Therefore, "hello" will be printed infinitely without ever stopping.