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

Vidur Bahl
PLUS
Vidur Bahl
Courses Plus Student 1,440 Points

Error is coming

i don't know why errror is coming ?

strings.swift
// Enter your code below

let name = "vidur."
let greeting = "Hi there, \(name)"




let finalGreeting = "\(greeting) How are you?"

1 Answer

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

Hi there! First, you need a full stop at the end of the string assigned to greeting. Secondly, the challenge explicitly asks you to use concatenation to set the string for finalGreeting. You've used interpolation to set yours. Remember, concatenation uses a plus sign to put together two strings. Take a look:

let name = "vidur."
let greeting = "Hi there, \(name)."
let finalGreeting = greeting + "How are you?"

Hope this helps! :sparkles:

Caleb Kleveter
Caleb Kleveter
Treehouse Moderator 37,862 Points

Vidur Bahl , remember to give the best answer to the answer the solved you issue. Thanks!