Animations

API

Arrays

Async

Basics

Challenges

Classes

Console

Dates

Debugging

DOM Elements

DOM Methods

DOM Navigation

DOM Properties

Event Listeners

Flow Control

Forms

Functions

Global Functions

JSON

Keywords

Libraries (3rd party)

Math

Modules

Objects

Snippets

String

Types

Widgets

Window Object

JavaScript - concat()

https://www.w3schools.com/jsref/jsref_obj_array.asp

The concat() method creates a new array by concatenating two arrays. The concat() method can take any number of array arguments.


    let arr1 = ["Cecilie", "Lone"];
    let arr2 = ["Emil", "Tobias", "Linus"];
    let arr3 = ["Robin", "Morgan"];
    let myChildren = arr1.concat(arr2, arr3);
    document.getElementById("demo").innerHTML = myChildren.join("*");

results: