The hash syntax you’ve seen so far (with the => symbol between keys and values) is sometimes nicknamed the hash rocket style.

numbers = { :one => 1, :two => "two", :three => 3, }

This is because the => looks like a tiny rocket!

Let’s build a hash from the ground up using symbols as keys.



Create a hash called movies with symbols as keys and strings as values.

Inside your hash, add two key/value pairs.

The keys should be the names of movies.

The values should be quick descriptions or reviews.

Check out the Hint if you want an example to get you started!

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?