iOS Swift Basics Swift Types String Manipulation

Colin Smith
Colin Smith
3,259 Points

Code works in swift. Bummer error in web console. Connectivity Issue?

I have compiled my code for the challenge successfully in Swift. However the code does not run in the web based console. Also sometimes I'm not able to get the preview to show me whatever error might have come up. Is there some kind of connection issue. Is there a preferred browser for this content? I'm using safari now.

strings.swift
// Enter your code below

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

let  finalGreeting = greeting + " How are you?"

2 Answers

Michael Hulet
MOD
Michael Hulet
iOS Development with Swift Treehouse Moderator 46,272 Points

Your code is actually totally valid, and should pass the challenge. Great job! That being said, it seems like you've found a weird issue with the challenge parser. Like I said, you have total valid Swift that should work, but the challenge checker gets thrown off by there being 2 spaces between let and finalGreeting. The Swift compiler will happily compile that, but for some reason, the challenge fails it. I've reported it as a bug, but in the meantime, if you remove one of those spaces, your code passes the challenge on my machine

Colin Smith
Colin Smith
3,259 Points

OMG thank you! that was driving me crazy :P