15/21 Need help on Now you try exercise (Now solved)


#1



Exercise 15/21 (Now you try)

Oops, try again. Did you define a lambda called symbol_filter?

Can anyone help resolve this error in this code?

my_array = ["raindrops", :kettles, "whiskers", :mittens, :packages]

# Add your code below!
yt67==]= 
symbol_filter = lambda { |symbol| symbol.is_a? Symbol}
symbols = my_array.select(&symbol_filter)


#2

Make it easy to help by being specific about what you want to know.
You'll get a better response and you'll get it faster because people (me) will just keep moving when they see that you just dumped the code and clicked the create topic button.


#3

Is my question and code format better now?


#4

Never mind, now.

I just had to delete the yt67==]= part in the code to make it work.

I was wondering why was the 'yt67==]=' part in the code, it doesn't make sense, right?


#5

Thanks jonatan, you're explanation will help me in the future when l ask more questions on topics in Codecademy.


#6

Slightly better.

What I'm really looking for is what piece of the puzzle you're missing so that I can say how I think you can find it yourself. The real problem isn't getting past the exercise, but learning how to do so.

Nobody really gets a straight answer on what's wrong from me (unless it's a super specific question), I'm all about addressing whatever is needed for that other person to figure it out themselves.

Usually, that starts with identifying the problem, so if that's not being done in the question, that's what I'll be nagging about!

So what you had here is that you did not see how that error message relates to your code. And I'd respond with that you should consider what your code is meant to do, and then test that. As a result you'd get some syntax error, and then you'd need to figure out how to make use out of that!


#7

Next time l will definitely try your explanation out when l have a problem that is occurring in my code.
Thank you again. :grin: