2018年1月21日

es6 中,大多数开发者和 babel 之类的工具默认添加 use strict 到 JS 文件的头部,确保采用严格模式

摘要: 严格模式(use strict) 有助于防止问题用法,并且它也有助于安全使用 JavaScript。 在 ES5 中, 严格模式是可选项,但是在 ES6 中,许多特性要求必须使用严格模式。 因此大多数开发者和 babel 之类的工具默认添加 use strict 到 JS 文件的头部,以确保整个 J 阅读全文

posted @ 2018-01-21 17:39 cag2050 阅读(202) 评论(0) 推荐(0) 编辑

js 数组方法比较

摘要: js 数组方法比较 table th:first of type { width: 80px; } table th:nth of type(2) { width: 120px; } table th:nth of type(3) { width: 160px; } 方法 | 是否影响原数组 | 返 阅读全文

posted @ 2018-01-21 13:31 cag2050 阅读(283) 评论(0) 推荐(0) 编辑

导航