You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-3Lines changed: 20 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -83,23 +83,40 @@
83
83
var item = {};
84
84
```
85
85
86
-
- Don't use [reserved words](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Reserved_Words) as keys.
86
+
- Don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work inIE8. [More info](https://github.com/airbnb/javascript/issues/61)
87
87
88
88
```javascript
89
89
// bad
90
90
var superman = {
91
-
class: 'superhero',
92
91
default: { clark: 'kent' },
93
92
private: true
94
93
};
95
94
96
95
// good
97
96
var superman = {
98
-
klass: 'superhero',
99
97
defaults: { clark: 'kent' },
100
98
hidden: true
101
99
};
102
100
```
101
+
102
+
- Use readable synonyms in place of reserved words.
0 commit comments