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

Jason Larkin
Jason Larkin
13,970 Points

Trouble with JS Strings

I am trying to find out what is wrong with this string that features escape characters. It keeps prompting me to put an n after the backslash but I have already done that. Can anyone help please?

Here is the js:

```var escapedNewLine = "escaped\nNew\nLine";

2 Answers

Hi Jason,

I didn't hunt down the challenge but I believe all that should be in the string is the new line character. Nothing else.

var escapedNewLine = "\n";

Try that.

Sage Elliott
Sage Elliott
30,003 Points

^ Jason is correct. I hunted it down and that's all it is calling for.