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

Chris Thomas
PLUS
Chris Thomas
Courses Plus Student 4,693 Points

Ok so in Xcode is coming out right but the online editor is not.

This is what I am inputting

let name = "Amos" let greeting = "Hi there, (name)"

thanks for the help

strings.swift
// Enter your code below
let name = "Amos"
let greeting = "Hi there,  \(name)"
Jeff McDivitt
Jeff McDivitt
23,970 Points

Your code is fine, what error are you getting that won't pass the challenge

I think the code won't pass because you have two spaces between "Hi there," and (name)". The online complier would take that as typo error.

It still happens to me often that I forgot to add . or !. Those tiny mistakes count.

1 Answer

Chris Thomas
PLUS
Chris Thomas
Courses Plus Student 4,693 Points

I got it to work. For some reason "" on iPad was what was messing me up.