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 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.

variables.swift
var language = ¨Swift¨

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
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

and

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.