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!
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
Or AlkalayCourses Plus Student 253 Points
What is the solution? Can't pass this easy task..
What is the right code for this task?
// Enter your code below var rating = 7.5
Did you delete the code of the first task? The task with the var rating is correctly solved, what I'm missing is the constant with the name of the book first. My solution (including task 3) is:
// Enter your code below let title = "A Dance with Dragons" var rating = 7.5 var isAvailable = false
The code you have is correct for task 2, but remember that you are meant to keep the code for each task as you progress through the challenge. It looks like you have removed the code you wrote for the first task, which is why your solution is not accepted.
If you add the code from task 1 back like this:
let title = "A Dance with Dragons" var rating = 7.5
Then you'll be able to pass to task 3.