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 trialJulian Zuleta
177 Pointslet price: Double = 9.99 and my code look it like not right
let price: Double = 9.99 any sugestions ? I'm lost
let price: Double = 9.99
3 Answers
Chris Stromberg
Courses Plus Student 13,389 Points// Swift can infer your type.
let price = 9.99
kjvswift93
13,515 PointsBoth of these answers are correct and will pass the challenge:
Answer explicitly stating the type.
let title: String = "A Dance with Dragons"
let price: Double = 9.99
let yearPublished: Int = 2011
Answer using type inference:
let title = "A Dance with Dragons"
let price = 9.99
let yearPublished = 2011
Bernardo Valdes
1,213 PointsPeople I found the problem. You cant erase the previous line. Where it says to declare the title. It specifically says at the top to build on top of previous code. I did it. I worked perfect.
kjvswift93
13,515 Pointskjvswift93
13,515 PointsYou shouldn't be receiving an error here. what error message are you getting?