I know that in PHP the only difference between double quotes and single quotes is the interpretation of variable inside a string.
Well, in jQuery Javascript, I often see doublequotes used in jQuery selectors, or in strings, is there a particular reason for that or is single quotes just the exact same as doublequotes?
Source: Tips4all, CCNA FINAL EXAM
You'll want to use single quotes where you want double quotes to appear inside the string (e.g. for html attributes) without having to escape them, or vice versa. Other than that, there is no difference.
ReplyDeleteThere is a difference in JSON, so I have started switching to using double-quotes as much as possible so that I don't make mistakes when dealing with JSON.
ReplyDeleteAbsolutly no difference. FREE QUOTING YEEHHAAA
ReplyDeleteThey are the same, I usually use single quotes but thats because I am a .net developer and asp.net in particular so it aids me in distinguishing between the 2 types of strings.
ReplyDelete