Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Express Basics (2015) Doing more with Express Making Lists in Jade Templates

Jerry Relunia
Jerry Relunia
17,148 Points

the line: each post in posts gives an error

On the blog.jade file, it seems to work fine until i get to "each post in posts" than i seem to get a parse error in express middleware? Does anyone know a way around this?

2 Answers

Tommy Choe
Tommy Choe
38,156 Points

Hey Jerry, I think Huston accidentally used the word "each" instead of "for". Try:

for post in posts

Let me know if it works for you.

Ginger Williams
Ginger Williams
6,409 Points

I get the same error for both each and for. Cannot read property 'length' of undefined