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 Basics (retired) Variables and Constants Constants

Munir Niaz
Munir Niaz
1,831 Points

Please help me with this

Can you help me with this to create a constant Language and assigning it with string "swift"

var str : String = "hello"
let language : String = "swift"  

1 Answer

Remember that answers are always Case Sensitive!

var saying = "goodbye"

var greeting = "Goodbye"

saying == greeting

XCode will give you a reading "False" for the last statement showing that these two statements are not equivalent in the Swift format.

Try it out to see what reading XCode will give you.

Just a long winded proof here to show that case matters when writing in Swift!