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!
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
Does using double quote in array matter or is it the same as single quote? I am just curious.
I just want to know if single or double quote matter when dealing with array. For example, var Names = ["John", "David", "Joe", "Moses"]; or I should stay with single quote like this var Names = ['John', 'David', 'Joe', 'Moses']; Thanks you and wonderful video.
Samuel Webb25,370 Points
They work the same in this situation. Use whichever one you like the most.
Sometimes you'll want to use one over the other. If you were quoting someone and wanted those quote marks to be a part of the string, it would be simpler to just use single quotes around the whole thing so you don't have to escape characters.
ok, thank you very much.