5. Create your own


I ran this array, and this is the message I keep getting back.

"Oops, try again. It looks like my_2d_array isn't an array."

my_2d_array = [[fox, doberman], [cat, lynx]]


Nevermind I figured it out. The fixed code looks like this

my_2d_array = [["fox, doberman"], ["cat, lynx"]]

This personally is the hardest part about codecademy. There isn't enough details in description, and little hiccups like that will hold me up for a while. In none of the examples prior to this step was quotes shown.


I can understand your confusion.
Here is some clarification.

You are creating a 2d array
my_2d_array = [[ information you want stored, more data you need], [you get the point, yep]]

You want the names of some animals inside your array specifically fox, doberman, cat, lynx.
Well data that looks like english is typically stored as strings! Ruby needs to see ' ' or " " to know what a string is. Otherwise Ruby sees the variable fox,doberman,cat,and lynx lost in a very dark and scary place

It's your civic duty to rescue those lost animals and turn them into strings with " "


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