Make the example even more obvious that the original array is not mutated

This commit is contained in:
Bill Mei
2017-12-26 17:14:52 -08:00
parent 068b92d085
commit f8b740e09a

View File

@ -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]
```