Q. What will be the output of the given ruby code?
Code:
array = [100, 200, 300, 400, 500] print array[4]
β
Correct Answer: (D)
500
Explanation: Array's index start from 0 so array[4] will give 500.