Answers for "vue nested loop"

0

vue nested loop

data: {
  sets: [[ 1, 2, 3, 4, 5 ], [6, 7, 8, 9, 10]]
},
methods: {
  even: function (numbers) {
    return numbers.filter(function (number) {
      return number % 2 === 0
    })
  }
}
Posted by: Guest on July-28-2021
0

vue nested loop

<ul v-for="set in sets">
  <li v-for="n in even(set)">{{ n }}</li>
</ul>
Posted by: Guest on July-28-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language