Reputation: 458
I simply want to loop the numbers from 0 to 19 using a v-for attribute.
I already tried this:
<div v-for="number in [...Array(6).keys()]" v-bind:key="number">
And this:
<div v-for="let i = 0; i < 20; i++" v-bind:key="i">
Of course I could just use an array with all numbers, but I think there is a better way to do this.
Upvotes: 0
Views: 621
Reputation: 1
You could loop through a fixed n
number like :
<div v-for="i in 20" v-bind:key="i">
Upvotes: 1