console.log("double");
vs. console.log(\'single\');
I see more and more JavaScript libraries out there using single quotes when ha
Now that it's 2020, we should consider a third option for JavaScript: The single backtick for everything.
This can be used everywhere instead of single or double quotes.
It allows you to do all the things!
Embed single quotes inside of it: `It's great!`
Embed double quotes inside of it: `It's "really" great!`
Use string interpolation: `It's "${better}" than great!`
It allows multiple lines: `
This
Makes
JavaScript
Better!
`
It also doesn't cause any performance loss when replacing the other two: Are backticks (``) slower than other strings in JavaScript?