The Delightful World of Vue
Looping with v-for
  Start your All-Access Pass to unlock this challenge
Buy Access Login

Challenge 1 / 1

Suppose we have an imaginary component with the following data property:

data() {
    return {
        fruits: [
            'Banana',
            'Strawberry',
            'Pienapple',
            'Apple',
        ],
    };
},

Delicious! Now we want to loop through these fruits and show each of them in a span element. What's the best way to accomplish this?

Skip challenges and go to theNext Chapter

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.