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 trialJohn Paul Luna
1,624 Points\n Usage println("Bread"\n"Milk"\n"Honey")
Taking the \n challenge and ran into problem with current line of code.
println("Bread"\n"Milk"\n"Honey")
2 Answers
Steve Hunter
57,712 PointsHi John,
You don't want to close the string like you are doing. Something like:
println("Bread\nMilk\nHoney");
Hope that helps,
Steve.
Meek D
3,457 PointsI think you need something like and the (end line or "\n") has to be within the " statement \n"
println("Bread\n","Milk\n","Honey\n")