[JavaScript] Combine arrays with concat()

Created on November 30, 2026

Call concat() to create a new array containing the elements of both arrays in order.

const arr1 = ['hello', 'world'];
const arr2 = ['good', 'bye'];
console.log(arr1.concat(arr2));
[ 'hello', 'world', 'good', 'bye' ]
JavaScript