In order to loop through each item in an array, we will use the
v-for Vue's directive.
v-for loop works on arrays/objects and is used to loop through each item in an array. This directive requires a special syntax in the form of
array is the source data array and
item is an alias for the array element being iterated on.
If you are coming from the PHP world you may notice that
v-for is similar to PHP's
foreach function. But be careful if you are used to
foreach($array as $value).
v-for is exactly the opposite, value in array.
The singular first, the plural next.
v-for can also take an integer. Whenever a number is passed instead of an array/object, the template will be repeated as many times ...