UNPKG

wat

Version:

Community-controlled cheat sheets for every coder.

15 lines (12 loc) 330 B
## array.concat(value1[, value2...]) ```js const arr1 = ['a', 'b', 'c']; const arr2 = [1, 2, 3]; const arr3 = arr1.concat(arr2); // ['a', 'b', 'c', 1, 2, 3] const num1 = [1, 2]; const num2 = [3, 4]; const num3 = [5, 6]; const nums = num1.concat(num2, num3, 7, [8, 9]); // [1, 2, 3, 4, 5, 6, 7, 8, 9] ```