console.log("double");
vs. console.log(\'single\');
I see more and more JavaScript libraries out there using single quotes when ha
I am not sure if this is relevant in today's world, but double quotes used to be used for content that needed to have control characters processed and single quotes for strings that didn't.
The compiler will run string manipulation on a double quoted string while leaving a single quoted string literally untouched. This used to lead to 'good' developers choosing to use single quotes for strings that didn't contain control characters like \n
or \0
(not processed within single quotes) and double quotes when they needed the string parsed (at a slight cost in CPU cycles for processing the string).