标签:javascript
不要再语句前面使用逗号。
// bad var story = [ once , upon , aTime ]; // good var story = [ once, upon, aTime ];
// bad var hero = { firstName: 'Kevin', lastName: 'Flynn', }; var heroes = [ 'Batman', 'Superman', ]; // good var hero = { firstName: 'Kevin', lastName: 'Flynn' }; var heroes = [ 'Batman', 'Superman' ];
// bad (function() { var name = 'Skywalker' return name })() // good (function() { var name = 'Skywalker'; return name; })();
标签:javascript
原文地址:http://blog.csdn.net/princeterence/article/details/45840613