Quiz on Hashes

Take a quiz on some hash concepts.

We'll cover the following

Quiz scenario

Consider a hash named dictionary that’s defined as follows:

dictionary = {
:one => 'uno',
:two => 'dos',
:three => 'tres'
}

Answer the following questions about this hash.

Quiz on Hashes

1

Which statement prints dos?

A)
dictionary['two']
B)
dictionary[:two]
C)
dictionary[:2]
D)

Both B and C

Question 1 of 30 attempted