From 8dc7dff773e65e76c85eb31bed9d7721902f6245 Mon Sep 17 00:00:00 2001 From: xsf Date: Mon, 16 Jul 2018 13:26:46 +0800 Subject: [PATCH] Update JS-ch.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 让新手更容易理解 --- JS/JS-ch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JS/JS-ch.md b/JS/JS-ch.md index 802cf714..06235c71 100644 --- a/JS/JS-ch.md +++ b/JS/JS-ch.md @@ -938,7 +938,7 @@ Object.setPrototypeOf(MyData.prototype, Date.prototype) 首先说下前两者的区别。 -`call` 和 `apply` 都是为了解决改变 `this` 的指向。作用都是相同的,只是传参的方式不同。 +`call` 和 `apply` 都是为了解决改变 `this` 的指向。作用都是相同的,只是传参的方式不同。通俗来讲就是,a有xx方法,b没有。b可以问a借! 除了第一个参数外,`call` 可以接收一个参数列表,`apply` 只接受一个参数数组。