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 trialgary chang
98 Pointsthe number question isn't it ?
var rating : Double = 7.5
??
// Enter your code below
Var rating : Double = 7.5
3 Answers
Jaroslaw Adamowicz
11,634 PointsHi, both answers from Giorgos Karyofyllis and Mark Carrel are correct!
var is keyword, and language itself is case sensitive.
So var is not the same as Var or VAR or vAr...
All are different.
Also var is not a type! And only types are written (or should be) with capital first letter. So:
var, struct, while, do, let -> all small letters
String, Double, Int -> types, all start with capital letter
true, false -> actually theese are values of type Bool and maybe considered as keywords as well, so small caps of course
Hope it helps a little!
Cheers!
Mark Carrel
9,873 PointsI think the problem may be that the code has "var" written with an uppercase 'V"? Should be lowercase.
gary chang
98 Pointsthank u
Giorgos Karyofyllis
21,276 Pointslet title = "A Dance with Dragons"
var rating = 7.5
var isAvailable = false
gary chang
98 Pointsgary chang
98 Pointsthank u so much