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

Im stuck on the first challenge of stage 2

I want to print learning swift but I can't separate the two words learning and swift

println.swift
let language = "Swift"
println("Learning // (language)")
let language = "swift"
println("learning \(language)")

here is the correct code - think you mixed up the comment with a variable

2 Answers

let language = "swift"
println("learning \(language)")

the "()" tells the code that you are placing a variable within the parentheses. the "//" comments out that particular line

any questions feel free to ask :)

It wont let me put a backslash so i had to substitute it for a forward slash.

String Interpulation is hard but this should fix the code

``` let language = "swift"

// notice only one backslash and there is no space between it and the parentheses

// the forward slash below is a backslash

println("Learning /(language)") ```

Hope it helps!

in your code you put a forward slash, not a back slash. the correct way of writing this code is

let language = "swift"
println("learning \(language)")