From f8b740e09a7595d88a566a8de9de7404ce9662bd Mon Sep 17 00:00:00 2001 From: Bill Mei Date: Tue, 26 Dec 2017 17:14:52 -0800 Subject: [PATCH] Make the example even more obvious that the original array is not mutated --- snippets/shuffle.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/snippets/shuffle.md b/snippets/shuffle.md index ccf6e64bd..fa576b016 100644 --- a/snippets/shuffle.md +++ b/snippets/shuffle.md @@ -13,5 +13,7 @@ const shuffle = ([...arr]) => { } return arr; }; -// shuffle([1,2,3]) -> [2,3,1] +// const foo = [1,2,3] +// shuffle(foo) -> [2,3,1] +// console.log(foo) -> [1,2,3] ```