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 Basics

Strings > Basics ( of JavaScript )

i try to use this code into :

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

but i face this ? Bummer! You've the string is the incorrect value remember to use \ before the " or '.

var statement="She said \"How \'s the family?";

1 Answer

Kevin Kenger
Kevin Kenger
32,834 Points

Hey Mousa,

There are a couple of things I see. The first is that you don't need the \ before the apostrophe since you're surrounding the string in quotes. This won't make it fail, it's just not necessary. Second, you don't have a closing quotation mark for the inner set of quotes. I think it should be something like this:

var statement = "She said \"How's the family?\"";

thanks i forget to add last (") .