Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Strings: single vs double quotes #34

Open
dpashkevich opened this Issue · 1 comment

1 participant

@dpashkevich

I use ExtJS library and they use single quotes everywhere. To me it's mostly a question of style except one good argument I've found so far: generating HTML. It's more convenient to use single quotes when you output html because html attributes are typically enclosed in double quotes:

```var myTemplate = [
'

',
'
',
...
'
'
'
'
];


I suggest a less strict guideline: just **be consistent**. Use whatever quotes you like but use them *everywhere*.
@dpashkevich

Also, Google's JavaScript Style Guide prefers ' over "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.