Vuejs v-for range 0 to 10

Edward Ziadeh • 6 May 2020
0 comments
0 likes
<template>
  <div class="container">
      Count : {{count}}
  

      <ul>
          <li v-for="index in (count - 0)" :key="index">
              {{ index }}
          </li>
      </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
        count: 5,
    };
  }
};
</script>

this will repeat il element n time using var count