Oops, try again. Did you declare an array called my_array?


#1

Can you please advise me on my code....need help!

s = [["bacon", "egg"], ["ham", "cheese"], ["chicken", "mayo"]]

s.each do | sub_array |
sub_array.each do | y |
puts y
end
end

This is what I get back after I try to save & submit

Oops, try again. Did you declare an array called my_array?

Please tell me what the problem is...I am confused and a bit frustrated at the mo! Many thanks in advance!


Data Structure.14
#2

Hi @samg2015,

Look at your array:

s = # array

And at the error message:

Oops, try again. Did you declare an array called my_array?

Are you able to see anything that might be causing the problem?


#3

OMG....I am such a dumbass!!! Thankyou so much, I have finally been greenlighted! :wink:


#6

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