Secret Identity problem. Am I suppose to put variables in the | |?


#1


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

(ruby):7: syntax error, unexpected $end, expecting keyword_end

Replace this line with your code. 
secret_identities = {
  "The Batman" => "Bruce Wayne",
  "Superman" => "Clark Kent",
  "Wonder Woman" => "Diana Prince",
  "Freakazoid" => "Dexter Douglas"
}
  
secret_identities.each do |v,x| puts "v: x"


#2

Well, you have to somehow enclose the block of each. You can use do ... end or braces.

And are you really sure that you want to print to the console "v: x"? I guess that you should be more interested in printing out v and x values :slight_smile:

Take a look here to see both methods -> https://repl.it/CpnA/0


And always remember about documentation, you can find there a lot of information that will save your time -> https://ruby-doc.org/core-2.2.0/Array.html#method-i-each


#3

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