Tutorialsplane

Vue.js remove Array item By Value


We can remove array item by value using the indexof item. Here in this tutorial, we are going to explain how you can remove item by value in vue.js. In this tutorial we are going to create an array in which we will remove item by specified value ie element. You can also use our online editor to edit and run the code online.


Vue.js remove Array item By Value Example

Here is an example to remove an element by value from an array-

Example:

<div id="app">	
	<p>{{myArray}}</p>
	<p>Click to Remove "Banana"</p>
	<button>Click Me</button>
</div>
 

Try it ยป

Output of above example-