4 ms·
I suspect it's mostly preference & less keystrokes (single tick requires no shift key). All the answers on stack overflow seem to indicated there's not really a
by ShakataGaNai 11y ago
I suspect it's mostly preference & less keystrokes (single tick requires no shift key). All the answers on stack overflow seem to indicated there's not really a difference:
http://stackoverflow.com/questions/3149192/difference-between-single-quotes-and-double-quotes-in-javascript http://stackoverflow.com/questions/3149192/difference-betwee...
http://stackoverflow.com/questions/242813/when-to-use-double-or-single-quotes-in-javascript http://stackoverflow.com/questions/242813/when-to-use-double...
- whoopdedo 11y agoSome languages (Perl and PHP) will interpolate variables in double-quoted strings. Getting in the habit of typing single-quotes defends against accidentally using variable substitution when you don't mean to.
- batuhanicoz 11y agoOn my Turkish Q keyboard, double quotes are the one keystroke and single quote is shift+2. Since I'm lazy I keep using double quotes when writing JavaScript.