Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <body> <p>Klicken Sie auf den Button, um zwei Arrays zu verbinden.</p> <button onclick="myFunction()">Click</button> <p id="demo"></p> <script> function myFunction() { var hege = ["Cecilie", "Lone"]; var stale = ["Emil", "Tobias", "Linus"]; var children = hege.concat(stale); document.getElementById("demo").innerHTML = children; } </script> </body> </html>