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 trialKeith Quinones
Courses Plus Student 1,946 Pointsim so confused the difference between me="keith" and me='keith' can anybody tell me more about this?
the difference and the proper use of "" and ' '
1 Answer
Michael Hulet
47,913 PointsThere is no difference (that I'm aware of) between using single quotes and double quotes to create strings. I generally use double quotes, personally, but I would think you should definitely use double quotes in a situations when your string contains an apostrophe or other single quotes, and you should use single quotes when your string would contain double quotes
Keith Quinones
Courses Plus Student 1,946 PointsKeith Quinones
Courses Plus Student 1,946 Pointsi think the same way too.. but in some of quiz here it says "ERROR" whereas i see nothing wrong with the code but when i try to change it to single qoute . . BOOM IT PASSED!.. . i just found it weird but at least i know that my thoughts are right (just for my peace of mind). Maybe its the answer are programmed to be exact.
big thanks :)
Michael Hulet
47,913 PointsMichael Hulet
47,913 PointsNo problem! Did the string in the challenge use double quotes? If you post the code challenge & your code, I might be able to help you figure out why
Keith Quinones
Courses Plus Student 1,946 PointsKeith Quinones
Courses Plus Student 1,946 Pointsi see. . i did checked it again!. . ur right its a good practice using double qoutes .. its was my mistake