4. Question about movies[title] = rating


#1

movies[title] = rating

How does this work? Does this add the movie you entered in gets.chomp to the movies hash?


#2

The variable title contains the title entered by the user.

The variable rating contains the rating entered by the user.

With this line of code, we're creating a key with title and the corresponding value to this key with rating, all this in the hash movies.