Join three arrays

A simple example of joining three arrays into one array.
<!DOCTYPE html>
<html>
<head>
   
</head>
<body>

<script>
    
          var cars = ["Lamborghini", "Ferrari"];
          var planes = ["A300", "F-16", "Mig-29"];
          var ships = ["Titanic", "Speedboat", "Brittanic"];
          var vehicles = cars.concat(planes, ships);  
    
    console.log(vehicles);
    
</script>

</body>
</html>

Responses

0 Replies