In jQuery, what is difference between using two single quotes for a string and using two double quotes for a string.
alert('I am using single quotes');
alert("I am using single quotes");
I see the same output for both.
There is no difference. You can use the one you prefer, as long as you're consistent about it.
I personally prefer using double quotes so I don't have to escape as much.
var a = 'I\'ve got O\'Hara and O\'Reilly coming.';
var b = "You've got absolutely nobody, O'Mallon!";
Convenience. If you have a string containing a single quote, you can use double quotes to wrap it without needing an escape character or vice versa.