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 Basics (retired) Types Printing Results

Imran Khalid
Imran Khalid
877 Points

Not sure what to do with this one plus i am not sure but my version of xcode does not have the println command ?????????

Not sure what to do with this one plus i am not sure but my version of xcode does not have the println command ????????? My version is the latest version by all accounts, so i am not sure what to do?

println.swift
let language = "Swift"
println("Learning Swift ")
V

2 Answers

Hi Imran,

The later versions of Swift, from v2.0 onwards, replaced the println command with the keyword print. The older tutorials are still using Swift 1.* which did have the println keyword.

For the sake of ease, replace println with print within Xcode and it should all work just fine for you. Remember, though, the challenges in the older courses will still be expecting to see println. I hope that helps,

Steve.

let language = "Swift"
println("Learning \(language)")

You're supposed to be passing in the new constant you created. assigning the word "language" to "Swift" means that when you use (language) to call the "Swift" constant, it is putting "Swift" in there.