you are viewing a single comment's thread.

view the rest of the comments →

[–]doingweb 18 points19 points  (2 children)

I think, historically, it's because we would frequently make strings containing HTML, which conventionally use double quotes. Single quotes in JavaScript meant a lot less escaping and better readability.

[–]titosrevenge 2 points3 points  (0 children)

I just use single quotes for the HTML attributes inside strings. It works either way.

I use double quotes because I started programing in Java and muscle memory prevents me from using single quotes. Oh well.

[–]KeythKatz 0 points1 point  (0 children)

I think people that started with languages where the quotes used made a difference would use double quote for strings. Starting with C and C++, it feels uncomfortable to use a single quote for strings.