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

What am I doing wrong? It won't accept my code

I'm doing everything exactly as shown in the video but it won't accept my code. I've tried:

println("Learning " + language) and

println("Learning " ,language)

println.swift
var greeting = "Hello"

let language = "Swift"

println("Learning " ,language)

1 Answer

Justin Iezzi
Justin Iezzi
18,199 Points

Hi John,

I recommend going back and watching the Printing Results lesson, Amit Bijlani explains a few different ways to add strings together. One method that Amit uses is called string interpolation, one that the code challenge will ask you to do if you try println("Learning " + language).

According to the video, it should look something like this -

println("Learning \(language)")