What is the output of the Ruby code (with line numbers) shown below?
1. (0...5).each do |i|
2. puts "Value of local variable is #{i}"
3. end
Correct Answer:
Value of local variable is 0
Value of local variable is 1
Value of local variable is 2
Value of local variable is 3
Value of local variable is 4
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Ruby MCQ Questions