the = operator. In the example below, we use the = operator to assign the contents of the first array to the second array.
To assign an array into another array, use the array’s operator.
The array operator is a little different than the assignment operator. It is a function that takes a two-dimensional array and the number of elements in that array and returns an array with the same number of elements, but with the elements of the first array shifted to the left by the specified amount.
We can assign values to an array, but we can’t do it by using the array.push method, so we have to use the array.splice method. Since we can’t assign values to a value, we can’t assign anything to the array. So we have to resort to using the array.splice method to remove and add items to an array.