Try it
Javascript
Jquery
Angular
Learn Angular
Learn Javascript
Learn Bootstrap
Learn jQuery
Concat-1
JavaScript
Concat
function is used to
concat
two arrays. See the code snippet:
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <button onclick="joinArrays()">Concatinate the arrays</button> <p id="sample"></p> <script> function joinArrays() { var cars = ["Alto", "Zen"]; var buses = ["Punbus", "PePso", "Linus"]; var result = cars.concat(buses); document.getElementById("sample").innerHTML = result; } </script> </body> </html>
Output
×
Save This try
Title
Description
<p>JavaScript <code>Concat</code> function is used to <code>concat</code> two arrays. See the code snippet:</p>