Q. What will be the output of the given ruby code?
Code:
digits = Array(0...9)
puts #{digits}
β
Correct Answer: (B)
[0, 1, 2, 3, 4, 5, 6, 7, 8]
Explanation: This will produce the following result : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]