Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Foundations Strings Escape Characters

Any help. Would you tell me what's wrong with this answer?

var escapedNewLine = "this is line1\nThis is line2\nThis is line3";
var escapedBackslash = "C:\\folder\\script.txt";
var escapedTab = "this is line1\nThis is line2\nThis is\t line3";

2 Answers

Dave McFarland
STAFF
Dave McFarland
Treehouse Teacher

Hi ed quijano

You've provided really good examples of those escape characters in action. The question is asking for something a lot simpler: just provide the escape characters -- with nothing else. So the first line should just be:

var escapedNewLine = "\n";

oh men! Thanks Dave

Dave McFarland
Dave McFarland
Treehouse Teacher

You bet! You're just too smart for that quiz :)