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 Basics (Retired) Ruby Numbers Create a Number

Jason Nelson
Jason Nelson
6,209 Points

Ruby Numbers

I have no idea why I can't figure this question out. Can anyone help??

Create a variable called year, then make it equal to the current year.

a = "year"

stuck from there

variable.rb
a = "year"
a 

2 Answers

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Name of the variable is on the left of the = symbol and without any quotes. The value should be on the right. If it's stored as a number, then it doesn't use quotes. If you want a string of characters and not a number that you can use in calculations, then you need quotes. So in this case:

year = 2014
Jason Nelson
Jason Nelson
6,209 Points

Thanks! could of sworn I tried that , smh something so simple.