Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Swift 2.0 Basics An Introduction to Swift Programming Working With Variables

Arcangelo Passaro
Arcangelo Passaro
35 Points

I followed the instructions and the code looks correct but I get this error message ¨use of unresolved identifier¨

I am sure it is a very simple thing but I can´t see where the error is.

var language = ¨Swift¨

2 Answers

Jennifer Nordell
Jennifer Nordell
Treehouse Teacher

Hi there! You do not need to import any files for this challenge and you're correct in that the challenge asks you to create a variable and not a constant. The problem here is that you aren't using double quotation marks.

Here's your code:

var language = ¨Swift¨

And here's the correct code with the correct quotation marks:

var language = "Swift"

When the quotation marks are corrected, your code passes! Hope this helps! :sparkles:

edited for additional note

Because I don't know what keyboard layout and language you're using, I'm unable to tell you exactly where on your keyboard these quotation marks are located.

Paul M
Paul M
16,370 Points

Did you have

import UIKIt


import Foundation

at the top of your file?

Try changing it to

let language: String = "Swift"

That changes it to a constant and sets it to the type of a String.