Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Vue.js Basics Sweeping Vues: Loops, Methods, Directives Sweeping Vues Quiz 1

what was wrong in my code?

new Vue({ el: '#app', data: { songs: ['Ventura Highway', 'Horse with No Name', 'Tinman'] } });

<div id="app"> <ul> <li v-show="data in vue">{{song}}</li> </ul> </div>

Stivan Radev
Stivan Radev
1,475 Points

You did not post your code. You have to copy and paste it here!

2 Answers

Steven Parker
Steven Parker
215,984 Points

The question itself contains some of the answers: "Fill in the blanks to display each song in the array of songs."

And since to code needs to be repeated for each array item, the first blank needs to indicate a loop ("v-for").

Your code should look like this
<li v-for="song in songs">{{song}}</li>