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

Throwing Syntax error though the syntax is correct

Task: Create a variable named greeting and assign it a value of "Hello".

My Code:

import UIKit

var greeting = "Hello"

error: Bummer! Make sure you're creating the right kind of string and check your syntax.

please let me know where am i going wrong.

Thanks

2 Answers

Try removing "import UIKit" You do not need this in the challenges :)

Thank you verymuch bro this is awesome. I was struggling to get my output, but this is where i missed Thanks a lot again :-)

Sure! When using Treehouse's code challenge. You are emulating the programming language. Therefore you really don't need to import any UI stuff because it is already there. Plus you are just emulating the language so it is not needed. Good luck friend :)