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

Bandoro Dimas
PLUS
Bandoro Dimas
Courses Plus Student 1,655 Points

Create a constant named language and assign it a string "Swift"

i have write :

let language : String = "Swift"

the web said error -_- i have decalared the constant

constants.swift

1 Answer

Sam Chaudry
Sam Chaudry
25,519 Points

Hi Bandoro

You don't have an error it's just a warning and nothing to be alarmed about. Swift is basically saying use '' instead of let language. In simple terms when you code in Swift the use '' is a general token which indicates a variable exists but it is not being used. When you programme more and more in Swift you will come across this so it is worth while knowing what it is.

Hope that helps