Start range in v-for="n in 10" from zero
You can also just subtract a value from your integer
<div v-for="n in 10">
{{ n - 1 }}
</div>
This way you can have numbers with a negative value
You can use index (i
) instead of value (n
), it will start with 0
:
<div v-for="(n, i) in 10">{{ i }}</div>
Output:
0
1
2
...