What is the output of the given code?
counter = 1
while counter < 11
puts counter
counter = counter + 1
end
counter = 1
while counter < 11
puts counter
counter = counter + 1
endA. Prints the number from 1 to 10
B. Prints the number from 1 to 11
C. Prints the number from 2 to 10
D. Infinite loop
Answer: Option A

Join The Discussion