1. 首页
  2. 数据库
  3. 其它
  4. soboleva_js_lesson37 源码

soboleva_js_lesson37 源码

上传者: 2021-04-26 13:00:55上传 ZIP文件 1.92KB 热度 5次
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
下载地址
用户评论