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

:) Same problem

Can you write it, I wanna see an example.

println.swift
let language = "Swift"
printLn("Learn + Language")

1 Answer

Martin Wildfeuer
PLUS
Martin Wildfeuer
Courses Plus Student 11,071 Points

The assignment asks you to use string interpolation, so an example would be:

let name = "Mar Ibra"
let greeting = "Hello \(name)"
print(name)

An example for string concatenation would be

let name = "Mar Ibra"
let greeting = "Hello " + name
print(name)

By the way, println (not printLn) has been replaced with print as of Swift 2.0, this course is dedicated to Swift 1.x and should be considered out of date. I would recommend to do the iOS development with Swift 2.0 track instead.

Hope that helps :)