How to loop through an array and render elements in Vue.js?

<ul>
  <li v-for="item in items">{{ item }}</li>
</ul>
data: {
  items: ['Item 1', 'Item 2', 'Item 3']
}

 

Post your Answer