Should string values values in JavaScript be documented with quotes in reference. #779
Replies: 2 comments
-
If "I prefer no rule as in the status quo and let me decide based on context" is an opinion you are willing to hear, then let that be it; otherwise I prefer quotes to none, because if we ever have non-string values like |
Beta Was this translation helpful? Give feedback.
-
+1 to having something to distinguish between strings and other values. A glance tells you it's a string; you don't have to look around. Our code formatter uses |
Beta Was this translation helpful? Give feedback.
-
The API reference documents string values inconsistently, with quote around the strings, and without. What do people prefer?
Note:
No quotes
An {{jsxref("Array")}} of strings representing blah.
Values may include:
someValue
anotherValue
With quotes
An {{jsxref("Array")}} of strings representing blah.
Values may include:
"someValue"
"anotherValue"
Beta Was this translation helpful? Give feedback.
All reactions