Iterating Over Hashes #please help


#1



https://www.codecademy.com/courses/ruby-beginner-en-F3loB/2/4?curriculum_id=5059f8619189a5000201fbcb#

Oops, try again. It looks like you didn't print anything to the console.

secret_identities = {
  "The Batman" => "Bruce Wayne",
  "Superman" => "Clark Kent",
  "Wonder Woman" => "Diana Prince",
  "Freakazoid" => "Dexter Douglas"
}
secret_identities.each do | nickname , name |
    puts #{nickname} ; #{name}
end 
#please help it print out the name on the console ,but it show the error messages


#2

Given that the term to describe this is, string interpolation it will assume a string form.

puts "#{nickname} ; #{name}"

#3


#4

Could be just the white space...

puts "#{custom}: #{name}"

#5

thanks ,it really works :hearts:


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.