Tutorialsplane

Vue.js Count Array Items


We can use native JavaScript length property to Vue.js Count Array Items. Here in this tutorial, we are going to explain how you can use this property to count Array items in vue.js. You can also use our online editor to edit and run the code online.


Vue.js Count Array Items Example

Here is an example of length property in vue.js-

Example:

<div id="app">
	<p>item 1 = {{ item1 }}</p>
	<p>Length = {{result}}</p>

	<button>Click Me</button>
</div>

Try it ยป

Output of above example-