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

Joshua Cohen
Joshua Cohen
3,582 Points

Stage 2 strings challenge task 1

Why isn't my answer working?

http://teamtreehouse.com/library/basics-3


Challenge task 1 of 1

Q: In 'strings.js' file define a string called 'statement' with the text of - She said "How's the family?"

TreeHouse: Bummer! You've the string is the incorrect value remember to use \ before the " or '.

My Answer: var statement = "She said, \"How\'s the family?\"";


Joshua Cohen
Joshua Cohen
3,582 Points

figured it out. The comma was throwing the error (even though that's correct English, right?)

2 Answers

Misha Shaposhnikov
Misha Shaposhnikov
8,718 Points

Yes, that is correct English. Treehouse's Challenges require EXACT answers, though. Good de-bugging on your part. =)