Quiz: Composite Data Types

Test your knowledge of arrays and hashes by attempting this short quiz.

1

What is the output of the following code?

        array = ["a","b","c"]
        puts array[-1]
A)

a

B)

b

C)

c

D)

This throws an error

Question 1 of 50 attempted

Get hands-on with 1400+ tech skills courses.