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

iOS Swift 2.0 Basics Swift Types Mixed Types

Possible Error in Code Challenge

Pasan Premaratne

In this Code Challenge, the question is:

Finally, we need to indicate that the book is available in our store. Declare a variable named isAvailable and assign a Boolean value of false.

Shouldn't it logically be mean this?

Finally, we need to indicate that the book is available in our store. Declare a variable named isAvailable and assign a Boolean value of true.

Best regards, Philip

2 Answers

Greg Kaleka
Greg Kaleka
39,021 Points

Good catch Philip. I would suggest another fix, though, that explains better what the variable is for, and how it would be used in an application:

Finally, we need to indicate whether the book is available in our store. Declare a variable named isAvailable and assign a Boolean value of false.

Either false or true is fine, but I think it's helpful to emphasize that this is a property that can be changed.

That's also great! Also, I learnt how to make a quote in Markdown from your post :smiley: