Is there a way to track the number of times two buttons are clicked individually as well as together?
<div id="app">
<p><button v-on:click="counter1 += 1">Add One More Click</button></p>
<p><button v-on:click="counter2 += 1">Add One More Click</button></p>
<p>The total clicks on both buttons: {{ counter1+counter2 }} times</p>
<p>Button 1 has been clicked: {{ counter1 }} times</p>
<p>Button 2 has been clicked: {{ counter2 }} times</p>
</div>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script>
var app = new Vue({
el: '#app',
data: {
counter1: 0,
counter2: 0
}
})
</script>
I'd love some help in achieving this functionality using vue!