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 trialJames Lees
11,225 PointsPossible code checker error
Hi there,
I am trying to submit my code on the code challenge. the challenge asks us to define a variable statement and then the string "She said How's the family?"
I have added the following code and the code checker keeps telling me to add a .
var statement = ' She said "How\'s the family?" ';
I can't work out what is wrong, please help.
Kind Regards,
James
3 Answers
Jason Anello
Courses Plus Student 94,610 PointsHi James,
I'm not sure if that is the exact code you put in the challenge or just what you typed on here but you have a leading and trailing space in that string.
notf0und
11,940 PointsForget my answer, Jason Anello is correct, your issue is the leading and trailing spaces.
James Lees
11,225 PointsHey Bryan and Jason, many thanks for your help. I played around with various permutations of the ' and " and eventually got one that worked a little while later. I will note the leading and trailing spaces, good learning. Thanks a lot!
notf0und
11,940 Pointsnotf0und
11,940 PointsNice catch, Jason. If you copy and paste the code from his post into the challenge, the error comes up.