Use the concat() method to concatenate two arrays. - Javascript Array

Javascript examples for Array:Quiz

Description

Use the concat() method to concatenate two arrays.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p id="demo"></p>

<script>
var girls = ["SVG", "L"];
var boys = ["E", "T", "L"];
var children = girls.concat(boys);
document.getElementById("demo").innerHTML = children;
</script>/*w w w .ja va 2  s .c  o  m*/

</body>
</html>

Related Tutorials