Just as you can break an array into separate arrays, you can always merge multiple arrays into a single one.
Here’s an example on how you can do that:
Consider you have an array named segment1 and another named segment2. You can merge the values of these two arrays into a new one or in an existing one. If you wish merge in an existing one, you can do something like:
segment1.push(...segment2)Code language: CSS (css)
This will push the elements of segment2 array into segment1 array.