What is the difference between single or double quotes in my JS and CSS? Is it a matter of opinion, of are there specific situations where one is required over the other.
In W3Schools, they use single-quotes for url('')
, but they use double quotes for font-face: ""
. Additionally, in a JavaScript tutorial I saw, they used both single and double quotes.
What's the difference?
Answer
The most important thing is to be consistent. Use the same quote style throughout the same project. If you enjoy writing JavaScript with single-quotes, please do. But If your teammate likes to use double-quotes, agree on what style to use before working.
Additional information:
No comments:
Post a Comment