We can join two or more arrays using JavaScript concat method in Vue.js. Here in this tutorial, we are going to explain how you can use this method in VueJs to join two or more arrays.
Vue.Js Array Concat Method Example
Here is an example of concat method in Vue.js-
Concat Function Example:
<div id="app"> <p>item 1 = {{ item1 }}</p> <p>item 2 = {{ item2 }}</p> <p>Concat = {{ item3 }}</p> <button>Click Me</button> </div> |
Concat function joins two or more arrays and returns the final array.
Output of above example-