Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Ruby Collections Ruby Arrays Removing Items From Arrays

Sean Flanagan
Sean Flanagan
33,235 Points

What's up with the console?

Hi. I don't know what's happened here.

Here's what I put in the console, along with error messages:

irb(main):001:0> grocery_list = ["milk", "eggs", "bread", "ice cream", "pie", pot
atoes"]                                                                          
irb(main):002:1" grocery_list = ["milk", "eggs", "bread", "ice cream", "pie", pot
atoes"]                                                                          
SyntaxError: (irb):1: syntax error, unexpected tSTRING_BEG, expecting keyword_do 
or '{' or '('                                                                    
..., "ice cream", "pie", potatoes"]                                              
...                               ^                                              
(irb):2: syntax error, unexpected tIDENTIFIER, expecting end-of-input            
grocery_list = ["milk", "eggs", "bread", "ice crea...                            
                     ^                                                           
        from /usr/local/bin/irb:11:in `<main>'                                   
irb(main):003:0> grocery_list = ["milk", "eggs", "bread", "ice cream", "pie", pot
atoes"]                                                                          

I'd appreciate any help please.

1 Answer

A simple typo - you missed the leading quotation mark for potatoes. It happens to the best of us! ;)

Sean Flanagan
Sean Flanagan
33,235 Points

I see that now. Thanks. :-)