Imagine we have an array called
colorArray = ['B', 'G', 'R', 'A']
and another array named array2 as Uint8Array
. How can we concatenate these two arrays together?
I attempted to use
var newArray = colorArray.concat(array2)
, but the resulting array does not seem correct. The length of newArray always remains at 5, regardless of the content in array2.