It all depends on what situation you find your self
Single quotes seem to be more commonly used. Most javascript code standards follow this convention:
'), rather than double quotes (").'' for strings.I PREFER double-quotes because I'm old school. Double quotes for strings, single quotes for chars. But, doing it the most accepted way is really the right way. Guess I gotta go change my code now... walks away, head hung in shame
Single quotes NOW that I came across this poll XD. (I'm justing starting out)
Doesn't really matter, use whatever you prefer, but stick to your decision!
Before I got into NodeJS, I used PHP extensively. In PHP, there is a difference between single and double quotes. I preferred single-quotes then and carried the habit on to JS.
Later, I found out about the Google JS Style Guide, which tells you to prefer single quotes. Since I mostly agree with that style guide, I always use single quotes (or template strings).
Aviraj Khare
Student
Mikey Scimeca
PTO
Single unless you need to use single quotes within quotes. Example let string = "I didn't like it"; You should use .eslintrc with Eslint plugin to help guide you.