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 Strings

Brett Red
PLUS
Brett Red
Courses Plus Student 105 Points

This lesson is broken.

My code reads: print("List:\n1\tBread\n1\tMilk\n1\tHoney")

I have a dev here telling me it's right, the site flashes white when I run the code, then it errors and doesn't say why. I'm loosing patients for these bugs.

strings.swift
print("List:\n1\tBread\n1\tMilk\n1\tHoney")

1 Answer

Jhoan Arango
Jhoan Arango
14,575 Points

Hello Bret : When it comes to coding, you have to be very very patient. Just ONE dot, can complicate your life. Perhaps your dev friend also did not seem to see this error, but here is the answer to your challenge. It works, I just did it.

println("Bread\n Milk\n Honey\nā€)

// you were using \n1 and \t , the challenge only wanted you to use \n

So it was not a bug, just a simple mistake. Happy coding, there will be a lot more challenges harder ahead which required a lot of patience and practice. Good luck