title: VueJS: setInterval method not working properly
body: <p>Please tell me what am i doing wrong? I want to active 'cloth' update every 2 sec. Still learning vue. Thanks</p>
  
  <pre><code>    data() {
          return {
              clothes: ['t-shirts', 'sneakers', 'jackets'],
              count: 0,
              cloth: ''
          }
      },
      methods: {
          startInterval() {
              setInterval(() =&gt; {
  
                  this.cloth = this.clothes[this.count]
                  this.count++
                  if (this.count &gt;= this.clothes.length) {
                      this.count = 0;
                  }
              }, 2000)
          }
      }
  </code></pre>