Search code snippets, questions, articles...

Loop n times vuejs

  <li v-for="(n, index) in 10">{{ n }}</li>

You can easily loop n times in Vue by just passing n value to it. As in the code snippet, the loop will iterate 10 times as we have passed a value 10 to it.

Search Index Data (The code snippet can also be found with below search text)

v-for loop n time Vue
Was this helpful?
Programming Feeds
Learn something new everyday on Devsheet