diff --git a/README.md b/README.md index 609fcb910d..88db16797e 100644 --- a/README.md +++ b/README.md @@ -83,23 +83,40 @@ var item = {}; ``` - - Don't use [reserved words](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Reserved_Words) as keys. + - Don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work in IE8. [More info](https://github.com/airbnb/javascript/issues/61) ```javascript // bad var superman = { - class: 'superhero', default: { clark: 'kent' }, private: true }; // good var superman = { - klass: 'superhero', defaults: { clark: 'kent' }, hidden: true }; ``` + + - Use readable synonyms in place of reserved words. + + ```javascript + // bad + var superman = { + class: 'alien' + }; + + // bad + var superman = { + klass: 'alien' + }; + + // good + var superman = { + type: 'alien' + }; + ``` **[[⬆]](#TOC)** ## Arrays