P
philmasterplus
When JavaScripting, I've often seen strings wrapped with single-
quotes:
----------------------------------------------------------------
var language = 'English';
----------------------------------------------------------------
However, I prefer double-quotes due to my experience with C++:
----------------------------------------------------------------
var language = "English";
----------------------------------------------------------------
Is there a problem with this? Why is everyone else, including those
who write popular libraries like Prototype.js, using single-quotes? I
know that it's best to stick to a single style when you code(that is,
if your coding style isn't horrible), but is using double-quotes
horrible? Or is it just because you want to use double-quotes inside
strings? :
quotes:
----------------------------------------------------------------
var language = 'English';
----------------------------------------------------------------
However, I prefer double-quotes due to my experience with C++:
----------------------------------------------------------------
var language = "English";
----------------------------------------------------------------
Is there a problem with this? Why is everyone else, including those
who write popular libraries like Prototype.js, using single-quotes? I
know that it's best to stick to a single style when you code(that is,
if your coding style isn't horrible), but is using double-quotes
horrible? Or is it just because you want to use double-quotes inside
strings? :