0
is there any difference between $(" ")&$(' ')?
bcz when i use $(" ") or $(' ') in jquery the answer are same.
4 odpowiedzi
+ 13
It is recommended to use double quotes but there's no difference at all.
Might be interesting to know that a test made by a StackOverflow user says that single quotes read faster the data inside parenthesis, naturally we talking about milliseconds and you do not really need to be worried about, if you're curious just visit the following links.
Comparison: http://jsfiddle.net/5HhWF/1/
jQuery Style Guide: http://contribute.jquery.org/style-guide/js/#quotes
+ 9
@Lord, thanks for share!
+ 8
@Maz
i checked the test comparison. ran the test with the same text 'single quote' the result was double quote was a little bit faster than single quote text some 10 milliseconds.
https://s20.postimg.org/s9zgduewd/Screenshot_20170821192450.jpg
+ 2
for js it's no difference