This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// spread operators allows any iterable to be expanded | |
// it can serve as a means of adding arrays (concatenation) | |
const arr1 = [1, 3, 4] | |
const arr2 = [10, 13, 5] | |
const bothArr = [...arr1, ...arr2] | |
// you can use this to update an array with | |
// another array without leading to a multidimensional array | |
let arr1 = [1, 3, 4] | |
const arr2 = [10, 13, 5] |