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 Swift Types String Manipulation

Bethel Loh
Bethel Loh
477 Points

Is this right? Let name = "Bethel" Let greeting = "Hi there, " + name

is the above right?^

strings.swift
// Enter your code below
Let name = "Bethel" 
Let greeting = "Hi there, " + name 

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! It's not quite correct, no. The word "Let" should be all lowercase: let. Also, the challenge explicitly asks you to use an interpolated string, but you're using a concatenated string.

Concatenation uses the + operator to put two strings together. Interpolation uses a backslash and parentheses to insert the value of a variable at that point in the string.

let myStringExample = "Example"

//Concationation example

print(myStringExample + " of concatenation")

// Interpolation example

print("\(myStringExample) of interpolation")

Hope this helps! :sparkles