[Vuejs]-Accessing an object property in JS

0๐Ÿ‘

  if (article.position === 'first') {

    let articlesList = this.$store.state.articles;

    for (i = 0; i < articlesList.length; i++) {
      if(articlesList[i].position === 'first')
        articlesList[i].position = "none"
    }
  }

I am just making smallest changes possible without mentioning best practices and stuff.

Leave a comment