|
25 | 25 | 1. [Constructors](#constructors)
|
26 | 26 | 1. [Modules](#modules)
|
27 | 27 | 1. [jQuery](#jquery)
|
28 |
| - 1. [ES5 Compatability](#es5) |
| 28 | + 1. [ES5 Compatibility](#es5) |
29 | 29 | 1. [Testing](#testing)
|
30 | 30 | 1. [Performance](#performance)
|
31 | 31 | 1. [Resources](#resources)
|
|
87 | 87 | // bad
|
88 | 88 | var superman = {
|
89 | 89 | class: 'superhero',
|
90 |
| - default: { clark: kent }, |
| 90 | + default: { clark: 'kent' }, |
91 | 91 | private: true
|
92 | 92 | };
|
93 | 93 |
|
94 | 94 | // good
|
95 | 95 | var superman = {
|
96 | 96 | klass: 'superhero',
|
97 |
| - defaults: { clark: kent }, |
| 97 | + defaults: { clark: 'kent' }, |
98 | 98 | hidden: true
|
99 | 99 | };
|
100 | 100 | ```
|
|
132 | 132 | - If you don't know array length use Array#push.
|
133 | 133 |
|
134 | 134 | ```javascript
|
135 |
| - var someStack = [], |
| 135 | + var someStack = []; |
136 | 136 |
|
137 | 137 |
|
138 | 138 | // bad
|
|
173 | 173 | var name = 'Bob Parr';
|
174 | 174 |
|
175 | 175 | // bad
|
176 |
| - var fullName = "Bob" + this.lastName; |
| 176 | + var fullName = "Bob " + this.lastName; |
177 | 177 |
|
178 | 178 | // good
|
179 |
| - var fullName = 'Bob' + this.lastName; |
| 179 | + var fullName = 'Bob ' + this.lastName; |
180 | 180 | ```
|
181 | 181 |
|
182 | 182 | - Strings longer than 80 characters should be written across multiple lines using string concatenation.
|
|
1182 | 1182 | var previousFancyInput = global.FancyInput;
|
1183 | 1183 |
|
1184 | 1184 | function FancyInput(options) {
|
1185 |
| - options || (options = {}); |
| 1185 | + this.options = options || {}; |
1186 | 1186 | }
|
1187 | 1187 |
|
1188 | 1188 | FancyInput.noConflict = function noConflict() {
|
|
1261 | 1261 | **[[⬆]](#TOC)**
|
1262 | 1262 |
|
1263 | 1263 |
|
1264 |
| -## <a name='es5'>ECMAScript 5 Compatability</a> |
| 1264 | +## <a name='es5'>ECMAScript 5 Compatibility</a> |
1265 | 1265 |
|
1266 | 1266 | - Refer to [Kangax](https://twitter.com/kangax/)'s ES5 [compatibility table](http://kangax.github.com/es5-compat-table/)
|
1267 | 1267 |
|
|
1323 | 1323 |
|
1324 | 1324 | **Blogs**
|
1325 | 1325 |
|
1326 |
| - - [DailyJS](//dailyjs.com) |
| 1326 | + - [DailyJS](http://dailyjs.com/) |
1327 | 1327 | - [JavaScript Weekly](http://javascriptweekly.com/)
|
1328 | 1328 | - [JavaScript, JavaScript...](http://javascriptweblog.wordpress.com/)
|
1329 | 1329 | - [Bocoup Weblog](http://weblog.bocoup.com/)
|
|
0 commit comments