From 7d9c9e80d2291bff49718b0c71c129575a212d86 Mon Sep 17 00:00:00 2001 From: bigfang Date: Wed, 8 Dec 2021 15:21:00 +0800 Subject: [PATCH] fix slice() link (#4156) --- beta/src/pages/learn/updating-arrays-in-state.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beta/src/pages/learn/updating-arrays-in-state.md b/beta/src/pages/learn/updating-arrays-in-state.md index 771788c7..92b1f7b4 100644 --- a/beta/src/pages/learn/updating-arrays-in-state.md +++ b/beta/src/pages/learn/updating-arrays-in-state.md @@ -35,7 +35,7 @@ Alternatively, you can [use Immer](#write-concise-update-logic-with-immer) which -Unfortunately, [`slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice) and [`splice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice) are named similarly but are very different: +Unfortunately, [`slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) and [`splice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice) are named similarly but are very different: * `slice` lets you copy an array or a part of it. * `splice` **mutates** the array (to insert or delete items).