Welcome to the Treehouse Community
Looking to learn something new?
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,369 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.