[Vuejs]-Age not rendering in html: VueJs

3👍

problem is missing comma symbol after add function 😀 .

Correct version of app.js as below :

new Vue({
  el: '#app',
  data: {
      age:22
    },
  methods: {
    add: function(){
      this.age++;
    },
    subtract: function(){
      this.age--;
    }
  }
});

Leave a comment