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 JavaScript Foundations Strings Escape Characters

Nathan Begnaud
Nathan Begnaud
8,221 Points

Can't Figure This Out

My code var escapedNewLine = "\n"; var escapedBackslash = "\n"; var escapedTab = "";

it keeps saying my string is not valid and i need two more backlashes. What?

2 Answers

Hi Nathan,

For escapedBackslash you have repeated the newline character.

To escape a backslash you need 2 of them \\

Nathan Begnaud
Nathan Begnaud
8,221 Points

Thanks all I needed was two \ and that was the answer lol

You're welcome.

var escapedTap should be \t

you have figured out the first challegne just right , your problem is about the two other challenges