+ 3
Any difference of single quotes and double quotes ? ' and "
Any diff while making string or any performance diff ?
5 Respostas
+ 4
Generally, single quotes are used to enclose a character and double quotes are used to enclose a string.
In JavaScript, a string with single quotes can be represented in double quotes and a string with double quotes can be represented in single quotes.
+ 3
No, there is no difference. I usually use double quotes so that I don't have to escape all of the single quotes in the Engligh language. But in the end it comes down to preference.
ES6 allows you to use a third alternative, called template strings. This is done by using back-tics. For example: `string goes here`. This also has many other advantages that you can read more about online. :)
+ 1
in JS
no in other languages like SQL or c# yes
0
No there is no difference between single and double quotes