Fix error

const combined = [...arr1, arr2] would result in [ 1, 2, 3, [ 4, 5, 6 ] ]
This commit is contained in:
Isabelle Viktoria Maciohsek
2022-07-31 18:37:27 +03:00
committed by GitHub
parent 4cf3b6f14c
commit bef132dadd

View File

@ -27,7 +27,7 @@ Using the spread operator, its possible to combine two or more arrays into on
```js
const arr1 = [1, 2, 3];
const arr2 = [4, 5, 6];
const combined = [...arr1, arr2];
const combined = [...arr1, ...arr2];
// [1, 2, 3, 4, 5, 6]
```