# 04 · 函数、this 与调用形式

> 学完这章，你能对任何 `this` 相关的报错给出准确解释：它由调用点决定，不是由定义位置决定；箭头函数是唯一的例外，而这个例外有代价。

## 本章目标

- [ ] 能说出四种调用形式（`f()`、`obj.f()`、`f.call/apply`、`new f()`）各自的 `this`，以及它们的优先级
- [ ] 能解释为什么 `const f = obj.method` 之后调用会丢 `this`，并给出三种修复
- [ ] 能说明箭头函数捕获 `this` 的时机与它没有的东西（`arguments`、`prototype`、`new`）
- [ ] 能手写一个 `bind`，并解释 `new` 为什么能覆盖 `bind` 绑定的 `this`
- [ ] 能说清默认参数的触发条件、`function.length` 的规则、`arguments` 与 rest 的差异
- [ ] 能解释严格模式如何改变默认绑定的 `this`

## 前置知识

- 第 03 章（作用域、绑定、闭包捕获绑定）
- 第 05 章尚未读也可以，但要知道对象属性访问的基本语法

## 从你熟悉的语言出发

| 概念 | C / C++ | Go | Java | JavaScript | 关键差异 |
| --- | --- | --- | --- | --- | --- |
| `this` / receiver | 成员函数隐式 `this`，静态确定 | 无 `this`，receiver 显式写在方法签名里 | `this` 静态绑定到实例 | `this` 由**调用点**决定 | 同一函数可用不同 `this` 调用 |
| 取方法值 | 成员函数指针需绑定对象 | `f := obj.Method` **绑定 receiver** | `obj::method` 绑定实例 | `const f = obj.method` **不绑定** | JS 的方法值只是函数，丢了接收者 |
| 函数重载 | 支持 | 不支持 | 支持 | **不支持** | 同名函数后定义覆盖前定义 |
| 参数默认值 | 支持（编译期展开） | 不支持 | 不支持 | 支持（运行时求值） | 默认值是表达式，可引用前面的参数 |
| 可变参数 | `...`（C） | `...T` | `T...` | rest `...args` | `arguments` 是类数组，rest 是真数组 |
| 构造 | `new` / 栈对象 | 复合字面量 | `new` | `new` 可作用于**任何**普通函数 | 没有类的时代也能构造对象 |

Go 程序员特别容易踩第二条：Go 的 method value 会把 receiver 一起打包，JS 不会。C++ 程序员则容易误以为 `this` 像成员函数那样静态确定——JS 的 `this` 更接近一个隐藏参数，由调用表达式传入。

## 正文

### 4.1 函数是对象，`this` 是隐藏参数

JS 的函数是一等值：可以赋值、传参、返回、挂属性。

```js
function add(a, b) { return a + b; }
add.tag = 'math';          // 函数也是对象，可以挂属性
const plus = add;          // 赋值只是复制引用
plus(1, 2);                // 3
```

每个函数对象内部有 `[[Call]]`（普通调用）和可选的 `[[Construct]]`（`new` 调用）。箭头函数有 `[[Call]]` 但没有 `[[Construct]]`，所以 `new (() => {})` 会抛 `TypeError`。函数还有 `name` 与 `length` 两个属性，前者来自定义方式（声明名、变量名、字面量推断），只用于调试和日志，不要拿它做逻辑分支。

`this` 不是词法作用域的一部分，而是每次调用时由调用表达式决定的一个**隐式参数**。规范里它通过 `OrdinaryCallBindThis` 绑定到当前执行上下文。理解这一点，就不会再问「这个函数的 `this` 是什么」——正确的问题是「这个函数是怎么被调用的」。

### 4.2 四种调用形式

| 形式 | 示例 | `this` | 备注 |
| --- | --- | --- | --- |
| 默认绑定 | `f()` | 严格模式 `undefined`；非严格 `globalThis` | 最容易出问题 |
| 隐式绑定 | `obj.f()` | `obj` | 看调用表达式里 `.` 左边是谁 |
| 显式绑定 | `f.call(ctx)` / `f.apply(ctx)` / `f.bind(ctx)()` | `ctx` | `bind` 返回新函数 |
| `new` 绑定 | `new F()` | 新创建的实例 | 优先级最高 |

```js
const obj = {
  name: 'obj',
  getName() { return this === undefined ? 'undefined' : this.name; },
};

obj.getName();            // 'obj'
const f = obj.getName;
f();                      // 'undefined'（严格模式）

obj.getName.call({ name: 'ctx' });  // 'ctx'
obj.getName.apply({ name: 'ctx' }); // 'ctx'
obj.getName.bind({ name: 'ctx' })(); // 'ctx'
```

隐式绑定看的是**引用**，不是「函数属于谁」。`(obj.getName)()` 仍然有 `this === obj`（括号不改变引用），但 `(0, obj.getName)()` 先用逗号运算符取出值，引用丢失，`this` 变成 `undefined`。这个细节解释了为什么「把方法赋给变量再调用」必然丢 `this`。

`new` 的四步（规范里由 `[[Construct]]` 完成）：

1. 创建一个新对象；
2. 把新对象的 `[[Prototype]]` 指向 `F.prototype`；
3. 以新对象为 `this` 执行函数体；
4. 如果函数体返回对象，则返回该对象；否则返回新对象。

所以构造函数不需要显式 `return this`；返回原始值会被忽略。第 05 章会把第 2 步展开成原型链。

**优先级**：`new` > 显式 `bind` > 隐式 `obj.f()` > 默认。示例 `01-this-binding-forms` 用两个最小实验验证前两条：

```js
function Who() { this.name = this.name || 'new-target'; }
const Bound = Who.bind({ name: 'bound-context' });
new Bound().name;   // 'new-target' —— new 忽略 bind 的 this

const bound = who.bind({ name: 'bound' });
const holder = { name: 'holder', who: bound };
holder.who();       // 'bound' —— 隐式调用改不掉已绑定的 this
```

注意 `bind` 的绑定是**永久**的：再 `call`、再当作方法调用，都无法覆盖（除非用 `new`）。

`bind` 还有两个常被忽略的细节：它支持预置参数（`f.bind(ctx, 1)` 把第一个参数固定为 1），并且返回的函数 `length` 会减去预置的参数个数；`bind` 产生的函数没有 `prototype` 属性（所以不能直接 `new` 出带该原型的实例，但 `new` 仍然可用，只是原型来自原函数）。这些细节在本章示例 `04-custom-bind` 里只实现主路径，原生 `bind` 的完整行为以规范为准。

`call` 与 `apply` 的唯一区别是参数形式：`call` 逐个传，`apply` 传一个类数组。ES6 之后有了展开运算符，`fn.apply(null, args)` 基本可以写成 `fn(...args)`；`apply` 现在主要出现在需要「借用方法 + 传数组」的场景里。

### 4.3 `this` 丢失的三个场景与修复

```js
const counter = {
  count: 0,
  inc() { this.count += 1; return this.count; },
};

const inc = counter.inc;
inc();                          // TypeError：this 是 undefined

[1, 2].map(obj.scale);          // TypeError：map 以 undefined 调用回调
setTimeout(obj.tick, 0);        // 定时器同样以 undefined 调用
el.addEventListener('click', obj.onClick); // 事件监听器也是
```

事件监听器还有一个容易记反的细节：`addEventListener` 用**普通函数**注册时，浏览器会把 `this` 设为当前元素（`currentTarget`），所以 `function () { this.classList... }` 能工作；换成箭头函数反而拿不到元素，因为它捕获的是外层 `this`。这是极少数「方法用箭头会坏」的宿主场景。

三种修复，适用场景不同：

```js
// 1. 箭头包装：回调里顺便用外层 this
[1, 2].map((n) => obj.scale(n));

// 2. bind：把方法本身交出去，之后调用都固定
[1, 2].map(obj.scale.bind(obj));

// 3. 调用点指定：临时一次
detached.call(obj, 4);
```

事件监听器有一个额外陷阱：`addEventListener` 存的是传入的函数引用。用 `obj.onClick.bind(obj)` 注册后，`removeEventListener` 必须传**同一个** bound 引用，否则移除不掉。要么提前保存 `this.handler = obj.onClick.bind(obj)`，要么用 `AbortController` 的 `signal` 统一取消（第 19 章）。

### 4.4 箭头函数：词法 `this` 与它的代价

箭头函数没有自己的 `this`，它读取**定义位置**外层函数的 `this`，并在定义时固定下来：

```js
const obj = {
  value: 42,
  viaArrow() { return [1, 2].map(() => this.value); },   // [42, 42]
  viaRegular() { return [1, 2].map(function () { return this.value; }); }, // TypeError
};
```

`() => this.value` 里的 `this` 来自 `viaArrow` 的 `this`（即 `obj`），而不是 `map` 回调的调用点。这也是为什么 `arrow.call(ctx)`、`arrow.bind(ctx)` 都改不了它：箭头函数没有 `[[ThisMode]]` 为 `lexical` 之外的选项。

代价是一组「没有」：

| 箭头函数没有 | 后果 |
| --- | --- |
| 自己的 `this` | 不能当对象方法（`obj.get = () => this.x` 会取到外层 `this`） |
| `arguments` | 要用 rest `...args` |
| `prototype` / `[[Construct]]` | 不能被 `new` |
| `super` / `new.target` | 只能在普通函数或方法里用 |

```js
const obj = { value: 1, get: () => this.value };
obj.get(); // TypeError：this 是模块顶层的 undefined
```

规则很简单：**回调用箭头，方法用普通函数（或 class 方法）**。如果需要一个能被 `bind` 改 `this` 的回调，就不要用箭头。

### 4.5 参数：默认值、rest、`arguments`

**默认值只在实参为 `undefined` 时生效**（包括显式传 `undefined`），`null` 不触发：

```js
function f(a, b = a * 2, c = b + 1) { return [a, b, c]; }
f(1);               // [1, 2, 3]
f(1, undefined);    // [1, 2, 3]
f(1, null);         // [1, null, 1] —— null + 1 === 1
```

默认表达式在**每次调用时**求值，且从左到右；参数列表本身也是一个作用域，所以 `function (a = b, b = 2)` 在 `a` 求值时 `b` 还在 TDZ，抛 `ReferenceError`。

`function.length` 只数「第一个默认值或 rest 之前」的参数：

```js
function a(x, y) {}          // a.length === 2
function b(x, y = 1, z) {}   // b.length === 1
function c(x, ...rest) {}    // c.length === 1
```

`arguments` 是函数调用时的类数组对象：有 `length`、可下标访问，但没有 `map`/`filter`，也不是 `Array`。它只在普通函数里存在，箭头函数没有；在严格模式（含模块）里，它与形参**不联动**（改形参不会改 `arguments`）。现代代码用 rest 代替它：

```js
function oldStyle(a) { return arguments.length; }  // 类数组
function modern(a, ...rest) { return rest.length; } // 真数组
```

「不联动」是严格模式有意移除的历史包袱：非严格模式下修改形参可能同步反映到 `arguments[0]`，反之亦然，这让引擎优化困难、也让代码难以推理。严格模式直接切断映射，`arguments` 退化成一份只读的调用快照（仍然可写，但不再与形参同步）。这也是为什么现代代码几乎没有理由再用 `arguments`。

JS 没有重载，也不校验参数个数：少传的参数是 `undefined`，多传的只能通过 `arguments`/rest 拿到。想模拟重载只能靠运行时分支，或在设计上拆成不同名字的函数。

### 4.6 高阶函数与柯里化

函数作为值，天然支持高阶函数：接收函数、返回函数。柯里化（currying）是把多参函数拆成单参函数链：
```js
const add = (a) => (b) => a + b;
add(1)(2); // 3

function curry(fn) {
  return function curried(...args) {
    if (args.length >= fn.length) return fn.apply(this, args);
    return (...rest) => curried.apply(this, [...args, ...rest]);
  };
}
const add3 = curry((a, b, c) => a + b + c);
add3(1)(2)(3); // 6
add3(1, 2)(3); // 6
```

部分应用（partial application）与柯里化不是一回事：前者一次固定若干参数（`bind` 就能做），后者强调每次一个。两者都依赖闭包保存已传入的参数——这正是第 03 章「闭包捕获绑定」的直接应用。

组合（compose）与管道（pipe）是高阶函数的另一个常见形态：

```js
const compose = (...fns) => (x) => fns.reduceRight((acc, fn) => fn(acc), x);
const pipe = (...fns) => (x) => fns.reduce((acc, fn) => fn(acc), x);

const normalize = (s) => s.trim().toLowerCase();
const exclaim = (s) => `${s}!`;
const shout = compose(exclaim, normalize);
shout('  Hello  '); // 'hello!'
```

`reduceRight` 让组合顺序与书写顺序一致（从右到左），`pipe` 则从左到右。两者都只是「用函数当值」的直接推论，没有魔法。

### 4.7 严格模式如何改变 `this`

| 调用 | 非严格（sloppy） | 严格（strict / module / class 体） |
| --- | --- | --- |
| `f()` | `this === globalThis` | `this === undefined` |
| `f.call(1)` | `this` 是装箱后的 `Number` 对象 | `this` 是原始值 `1` |
| `f.call(null)` | `this === globalThis` | `this === null` |

```js
function sloppyThis() { return this; }
sloppyThis();          // 非严格：window / globalThis

function strictThis() { 'use strict'; return this; }
strictThis();          // undefined
```

模块自动严格模式，class 体也自动严格模式。所以现代代码里「默认绑定得到 `globalThis`」基本不会发生；看到这种描述时，先确认代码是不是在旧脚本里。也正因如此，旧代码里 `var self = this` 的写法很常见——不是为了「保存 this 的副本」，而是为了在回调里避开默认绑定。想在自己的脚本里获得同样的可预测性，就在文件或函数开头写 `'use strict';`。

### 4.8 `call` / `apply` 的三个真实用途

除了「临时指定 this」，`call`/`apply` 在标准库里还有一类用途：**借用别的方法**。方法本质上是「第一个参数为 this 的函数」，所以数组方法可以作用在任何类数组对象上：

```js
function sum() {
  // arguments 是类数组，没有 reduce；借用数组方法
  return Array.prototype.reduce.call(arguments, (a, b) => a + b, 0);
}
sum(1, 2, 3); // 6

// 现代写法
const nums = [3, 1, 2];
Math.max.apply(null, nums); // 3
Math.max(...nums);          // 3，更清晰
```

第三个用途是 ES5 时代的继承：子构造函数借用父构造函数初始化实例。

```js
function Animal(name) { this.name = name; }
function Dog(name) {
  Animal.call(this, name); // 以当前实例为 this 执行父构造函数
  this.barks = true;
}
```

`class extends` 出现后不再需要手写这一行，但读旧代码时会经常遇到（第 05 章会把它与 `Object.create` 组合成完整的 ES5 继承）。注意 `apply` 的第二个参数不要求是真正的数组，任何类数组（有 `length` 和下标）都行；规范用 `CreateListFromArrayLike` 读取它。

### 4.9 class 字段箭头函数：每个实例绑定一次

如果确实需要「把方法交出去还不丢 this」，class 字段 + 箭头函数是比 `bind` 更常见的现代写法：

```js
class Counter {
  count = 0;
  inc = () => {
    this.count += 1;
    return this.count;
  };
}

const c = new Counter();
const inc = c.inc;
inc(); // 1 —— 箭头在构造时捕获实例，交出去也不丢
```

代价是**每个实例都创建一个新函数**，而原型方法只有一份。实例很多时这是真实的内存开销；而且字段在构造函数执行时初始化，子类字段会覆盖父类同名字段。选择标准：需要交出去的回调（事件处理器、定时器）用字段箭头；普通方法留在原型上。

### 4.10 什么时候不需要 `this`

`this` 是为了「同一函数服务多个对象」而存在的。如果函数只操作参数，就完全不需要它：

```js
// 需要 this：方法依赖接收者状态
const counter = { count: 0, inc() { return ++this.count; } };

// 不需要 this：纯函数，输入输出都在参数里
const increment = (n) => n + 1;
```

纯函数更容易测试、组合和推理。把状态显式作为参数传入，往往比维护一个可变的 `this` 更清晰——这也是函数式风格在现代前端流行的原因之一。`this` 不是必须用的语言特性，只在对象方法、构造函数和需要动态接收者的场景里才有价值。

### 4.11 排查清单：看到这些报错先想 `this`

| 报错 / 现象 | 典型原因 | 修法 |
| --- | --- | --- |
| `Cannot read properties of undefined (reading 'x')` | 方法被取出或当回调，`this` 为 `undefined` | 箭头包装 / `bind` / 调用点 `call` |
| `x is not a function` | 不是 `this` 问题，常见于 `var f = function` 在赋值前调用 | 检查声明顺序与提升（第 03 章） |
| `Illegal invocation` | 把内建方法取出单独调用（`const log = console.log; log('x')`） | 保留接收者：`console.log.bind(console)` |
| `Class constructor X cannot be invoked without 'new'` | 把 class 当普通函数调用 | 用 `new`，或改成工厂函数 |
| 回调里 `this` 是 `window` / `globalThis` | 代码运行在非严格模式，且是默认绑定 | 改用模块/严格模式，或显式绑定 |
| 箭头函数里 `this` 不是预期的对象 | 箭头捕获的是定义位置的外层 `this` | 改普通方法，或在正确的外层定义箭头 |

`Illegal invocation` 值得单独说：`console.log`、`document.querySelector` 这类宿主方法内部依赖 `this` 是宿主对象。单独取出来调用（例如 `const q = document.querySelector; q('div')`）会抛这个错。浏览器 API 文档里写「需要正确的 this」就是指这件事。

把这些报错与本章的绑定规则对上，绝大多数 `this` 问题可以在几分钟内定位，而不是靠猜。

## 反直觉差异：`this` 与词法作用域无关、`new` 会改变 `this`

**你的直觉**：`this` 应该像 Java 的 `this` 一样，指向「这个方法所属的对象」，在定义时就确定；`new` 只是创建对象的语法，不该影响函数内部的 `this`。

**实际行为**：

```js
const a = { name: 'a', who() { return this.name; } };
const b = { name: 'b' };

a.who();          // 'a'
a.who.call(b);    // 'b' —— 同一个函数，换了个 this
const w = a.who;
w();              // TypeError（严格模式）：this 是 undefined
```

`this` 与函数定义的位置无关，与它被哪个对象持有也无关，只与**这次调用的形式**有关。箭头函数是唯一例外，它反而按定义位置捕获。

`new` 则是优先级最高的绑定：

```js
function Person() { this.name = 'new'; }
const Bound = Person.bind({ name: 'bound' });
new Bound().name; // 'new' —— new 直接换掉了 bind 的 this
```

**为什么这样设计**：`this` 是「方法复用」的机制，不是「对象身份」的机制。同一个函数可以被不同对象借用（`call`/`apply`），可以传给回调，也可以当构造函数；如果 `this` 静态绑定，这些都无法表达。代价是调用点一变，行为就变，于是有了「丢 this」这一类问题。箭头函数是对这个代价的补丁：需要词法捕获时，用它显式声明。

**正确写法**：

- 方法用普通函数或 class 方法；回调用箭头函数。
- 把方法作为值传出时，用 `bind` 或箭头包装，并保存引用以便移除。
- 不要把箭头函数当对象方法，也不要用 `arguments`（用 rest）。
- 需要可预测的 `this` 时，显式 `call`/`bind`，不要依赖调用形式。

## 示例索引

| 目录 | 演示什么 | 预期看到 |
| --- | --- | --- |
| `examples/04-functions-this/01-this-binding-forms/` | 四种调用形式与优先级、箭头函数的词法 `this` | 默认绑定 `undefined`，`new` 压过 `bind` |
| `examples/04-functions-this/02-lost-this/` | 方法被取出/当回调时丢 `this`，三种修复 | 两个 `TypeError`，三种修复都得到 `10,20` / `12` |
| `examples/04-functions-this/03-arrow-this/` | 箭头函数捕获外层 `this`；当方法则失败 | `42,42` 与两个 `TypeError` |
| `examples/04-functions-this/04-custom-bind/` | 手写 `bind`：this、预置参数、`new` | 与原生 `bind` 结果一致，`instanceof` 为 true |
| `examples/04-functions-this/05-parameters/` | 默认值、`arguments`、rest、参数 TDZ | `null` 不触发默认值，`function.length` 分别为 2/1/1 |

五个示例都只依赖语言本身，机器测试覆盖全部断言；浏览器只用于看 Console 排版。

## 练习题

1. 预测输出并解释：

   ```js
   const obj = {
     name: 'obj',
     arrow: () => this.name,
     regular() { return this.name; },
   };
   console.log(obj.regular());
   console.log(obj.arrow());
   ```

   <details><summary>参考答案</summary>

   `obj.regular()` 输出 `'obj'`：隐式绑定，`this` 是 `obj`。
   `obj.arrow()` 抛 `TypeError`：箭头函数在对象字面量里定义，捕获的是模块顶层的 `this`，即 `undefined`；访问 `undefined.name` 直接报错。

   修正：要访问 `obj.name`，用普通方法；或在普通方法内部再定义箭头函数，让它捕获该方法的 `this`。

   </details>

2. 用 `bind` 实现一个 `once(fn)`：返回的函数最多执行一次，后续调用直接返回第一次的结果。
   <details><summary>参考答案</summary>

   ```js
   function once(fn) {
     let called = false;
     let result;
     return function (...args) {
       if (!called) {
         called = true;
         result = fn.apply(this, args);
       }
       return result;
     };
   }

   const init = once((x) => x * 2);
   init(2); // 4
   init(10); // 4
   ```

   这里用 `fn.apply(this, args)` 而不是直接 `fn(...args)`，是为了让 `once` 返回的函数被当作方法调用时，`this` 能透传给原函数。若不需要透传，直接 `fn(...args)` 更清晰。

   </details>

3. 手写 `myCall(fn, ctx, ...args)` 与 `myApply(fn, ctx, argsArray)`，要求不调用原生的 `call`/`apply`，并说明它们与 `bind` 的区别。
   <details><summary>参考答案</summary>

   ```js
   function myCall(fn, ctx, ...args) {
     const key = Symbol('fn');
     const target = ctx == null ? globalThis : Object(ctx);
     target[key] = fn;
     try {
       return target[key](...args);
     } finally {
       delete target[key];
     }
   }

   function myApply(fn, ctx, argsArray) {
     return myCall(fn, ctx, ...argsArray);
   }
   ```

   思路是把函数临时挂到目标对象上，用隐式绑定调用，再删掉。`call` 接收展开的参数，`apply` 接收数组；两者都**立即执行**。`bind` 不执行，返回一个固定了 `this` 与部分参数的新函数。真实代码不要用这种实现（会污染目标对象、遇到不可扩展对象会失败），它只用于理解「隐式绑定」的机制。

   </details>

4. 解释 `obj.method` 与 `(0, obj.method)` 在调用时的差别；再解释为什么 `setTimeout(obj.method, 0)` 会丢 `this`。
   <details><summary>参考答案</summary>

   `obj.method` 是一个「引用（Reference）」，记录 base 对象 `obj`；`obj.method()` 调用时把 base 作为 `this`。`(0, obj.method)` 先用逗号运算符求值，得到函数值本身，引用被丢弃；再调用就是默认绑定，严格模式下 `this === undefined`。

   `setTimeout(obj.method, 0)` 把函数值传给宿主，宿主在定时器回调里以普通调用形式执行它（没有 base 对象），所以 `this` 丢失。修复用 `setTimeout(() => obj.method(), 0)` 或 `setTimeout(obj.method.bind(obj), 0)`。

   </details>

## 章末自检

能不看资料回答以下问题即算过关：

1. 四种调用形式的 `this` 分别是什么？优先级如何排序？
2. 为什么 `const f = obj.method; f()` 会丢 `this`？三种修复方式各自的代价是什么？
3. 箭头函数的 `this` 在什么时候确定？它没有哪些东西？
4. `new` 的四步是什么？为什么 `new` 能覆盖 `bind` 的 `this`？
5. 默认参数在什么情况下生效？`function (a = b, b = 2)` 调用时会发生什么？
6. 严格模式与非严格模式下，`f()` 与 `f.call(1)` 的 `this` 分别是什么？
7. `addEventListener` 用普通函数注册时 `this` 是什么？换成箭头函数为什么不对？
8. 一个已经被 `bind` 固定 `this` 的函数，再 `call` 一次能改回来吗？用 `new` 呢？

## 延伸阅读

- **ECMA-262**：§10.2.1.2 *OrdinaryCallBindThis*（`this` 的绑定算法，含严格/非严格分支）
- **ECMA-262**：§10.2.2 *[[Construct]]*（`new` 的四步与返回值规则）
- **ECMA-262**：§15.3 *Arrow Function Definitions*（箭头函数的 `[[ThisMode]]` 为 lexical）
- **ECMA-262**：§20.2.3.2 *Function.prototype.bind*（原生 `bind` 的完整行为，含 `new` 与 `length`/`name`）
- **MDN**：`this`、*Arrow function expressions*、*Function.prototype.bind*、*Rest parameters*
