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

ana r
ana r
201 Points

I can't figure out what I'm doing wrong!!!

help me I've been stuck for like an hour.

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

3 Answers

So you are not supposed to type "Learning Swift". Swift is already assigned to a constant so you need to call that in the code like this.

let language = "Swift"

println("Learning \(language)")

Hi Ana, remember variables and constants are like boxes for data or information.

So imagine

let language = "swift"

is like putting the word or value "swift" inside the box names language. Now we use the function println or print to type out the data or value inside our box, so

ios print("Learning \(language)"

ignore the ios in my last comment, it was a markdown error

ana r
ana r
201 Points

thank you :)