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 trialamandae
15,727 PointsDisplaying an array of objects displays nothing...
Any ideas why this doesn't work? It doesn't throw any error codes. It seems like the browser isn't recognizing directory.js, but I don't know why. I've tried it in Notepad++ and workspaces, and the same thing happens both places. Thank you in advance for any help!
Here's the snapshot:
2 Answers
Joseph Yhu
PHP Development Techdegree Graduate 48,638 PointsYou have a typo in your index.html file, <script scr="js/directory.js"></script>
.
Edit: Also for this line in your directory.js file, for (let i=0, i<pets.length, i++) {
, you have to separate them with semicolons, not commas.
amandae
15,727 PointsThank you, Joseph. I feel very dense right now. I had been over that line probably 100 times, and didn't see those letters mixed up.
Thank you, also, for finding my next mistake before I had to look for it! The website is works now, finally!
Have a great day!