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

JavaScript

Set the 'escapedNewLine' variable to the string of a new line character.

hi im on this code challenge and I dont understand the question I use this code but its not correct apparentlyvar escapedNewLine = "escaped\nNew\nLine"; thanks for the help!

5 Answers

Answer is "\n"

Misleading question challenge, I know.

WOW! Thanks! definitely not what i expected.

Never mind I just needed to use \n as the string

whats the right answer! I don't get the question at all??

var escapedNewLine = "\n"; console.log(escapedNewLine);

Agreed, this question is confusing. I was trying to write a string with a new line. When would you ever set a string to just \n in javascript?

Merche Haruna Hirooka
Merche Haruna Hirooka
11,526 Points

var escapedNewLine ="\n";

went correct