Wednesday, July 25, 2018

javascript - What is the difference between single or double quotes in my JS and CSS?




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

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...