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 trialSarah Dawson
2,532 PointsWhy doesn't "@transactions.push(description => description, amount => amount)" work for this exercise?
Since you can create a hash with "=>" and ":", I assumed I could substitute the former, even though the latter was used in the video. Can you explain why I can't do that here? I checked the documentation, and I didn't see anything that would prohibit the usage. Thanks!
1 Answer
Zachery Irvin
13,958 PointsThe question specifically states that the key needs to be a symbol. The way you have answered the question is using a string as the key. The keys need to be symbol syntax with a :
Zachery Irvin
13,958 PointsZachery Irvin
13,958 PointsThe question specifically states that the key needs to be a symbol. The way you have answered the question is using a string as the key. The keys need to be symbol syntax with a :