随笔分类 -  es6

该文被密码保护。
posted @ 2021-06-13 20:43 star-meteor 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2021-06-13 11:43 star-meteor 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2021-06-13 01:03 star-meteor 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2021-06-13 00:48 star-meteor 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2021-06-13 00:38 star-meteor 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2021-06-12 23:58 star-meteor 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2021-04-12 22:53 star-meteor 阅读(12) 评论(0) 推荐(0)
摘要:用来确定一个字符串是否包含在另一个字符串中 原来,JavaScript 只有indexOf方法 返回index ES6 又提供了三种新方法includes(), startsWith(), endsWith()返回布尔值,但是使用第二个参数n时,endsWith的行为与其他两个方法有所不同。它针对前 阅读全文
posted @ 2021-04-12 14:27 star-meteor 阅读(99) 评论(0) 推荐(0)
摘要:Iterator 的作用有三个: 一是为各种数据结构,提供一个统一的、简便的访问接口; 二是使得数据结构的成员能够按某种次序排列; 三是 ES6 创造了一种新的遍历命令for...of循环,Iterator 接口主要供for...of消费。 阅读全文
posted @ 2021-04-01 16:35 star-meteor 阅读(40) 评论(0) 推荐(0)
摘要:数组的解构 ES6 允许按照一定模式,从数组和对象中提取值,对变量进行赋值,这被称为解构 默认值:解构赋值允许指定默认值 (1)(ES6 内部使用严格相等运算符( ),只有当一个数组成员严格等于undefined,默认值才会生效) let [x, y = 'b'] = ['a']; // x='a' 阅读全文
posted @ 2021-03-31 10:07 star-meteor 阅读(140) 评论(0) 推荐(0)
摘要:let 1.块级作用域(ES5 只有全局作用域和函数作用域) (1).只在let命令所在的代码块内有效(for)。 var a = []; for (let i = 0; i < 10; i++) { a[i] = function () { console.log(i); }; } a[6](); 阅读全文
posted @ 2021-03-30 17:18 star-meteor 阅读(40) 评论(0) 推荐(0)