Hashes and Symbols: Nil: a Formal Introduction

Hi All,

I am stuck on Hashes and Symbols: 3 Nil a formal introduction. I think I am managing to access a key that doesnt exist, it produces “Nil” in the console but I am still recieving an error saying no need to print to console. Any advise would be great, thanks.

```

creatures = { “weasels” => 0,
“puppies” => 6,
“platypuses” => 3,
“canaries” => 1,
“Heffalumps” => 7,
“Tiggers” => 1
}

creatures[“Zoidberg”]

Error Message: - Oops, try again. No need to print anything to the console!

<do not remove the three backticks above>

Code is correct, you’re getting “nil” which is the point…

You could,

  • Try refreshing the page
  • Restart your browser
  • Use another browser for this exercise
  • Log out / log back into your account
1 Like

Thanks for that. I went back into it and hit submit - as if by magic its now working…!

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