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