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

I am trying to create a constant named language which is a string named "Swift" I am getting error message?

The answer I gave was:

let language: string = "Swift"

??

constants.swift
let language: string = "Swift"

1 Answer

Jason Wayne
Jason Wayne
11,688 Points

Your type string is spelled in lowercase, which is not recognised. string is not String.

Tested the code below in Playground, it should do the trick: let language: String = "Swift"

Thanks so much Jason!! I found the answer and have been moving at a great pace!!!