soboleva_js_lesson37 源码
JavaScript样式指南 1.始终使用let或const进行变量声明。 :thumbs_down: 不要这样做: :down_arrow: SuperPower =新的SuperPower(); :thumbs_up: 应该是这样的: :down_arrow: const superPower =新的SuperPower(); 2.使用if .. else结构时,将else放在同一行上,并用圆括号将if块关闭。 :thumbs_down: 不要这样做: :down_arrow: 如果(测试){ Thing1(); Thing2(); } 别的 { Thing3(); } :thumbs_up: 应该是这样的: :down_arrow: 如果(测试){ Thing1(); Thing2(); } 别的 { Thing3(); } 3.不要在对象本身上调用Object.prototype的内置方法(例如hasOwnProperty,propertyIsEnumerable和isPrototypeO
下载地址
用户评论