Articles → JAVASCRIPT → Array Concat Function In Javascript
Array Concat Function In Javascript
Purpose
Example
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script>
const array1 = ['a', 'b', 'c'];
const array2 = ['d', 'e', 'f'];
const array3 = array1.concat(array2);
console.log(array3);
</script>
</head>
<body></body></html>
Output