JS tablica nie odniesienie
let arr1 = [1,2,3,4,5]
let arr2 = arr1 // copies the reference of the array
arr2 = [...arr1] // copies the values of the array
stormerthe2nd
let arr1 = [1,2,3,4,5]
let arr2 = arr1 // copies the reference of the array
arr2 = [...arr1] // copies the values of the array