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

Jonny H.
Jonny H.
311 Points

Can someone just give me the answer to this problem? I can reverse engineer the rest from there.

I don't really understand what I am being asked to do and I keep getting error messages no matter what I come up with.

Can someone just give me the answer so I can reverse engineer from there?

println.swift
let language: String = "Swift"

println("Learning " + language)

2 Answers

Jhoan Arango
Jhoan Arango
14,575 Points

Hello Jonathan :

This challenge is about string interpolation.

let language: String = "Swift"


println("Learning \(language)") // This is string interpolation 

Hope this works

Jonny H.
Jonny H.
311 Points

I feel so stupid but I tried so many similar combinations.

Thanks for your help, man.

Marko Jakovljevic
Marko Jakovljevic
1,286 Points

I'm not sure what the question is asking you. I'm assuming that you are first defining a constant language then you are using in to println Learning Swift

The answer would be to escape the constant within the string:

println("Learning (language)")