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

Alexandre verneau
Alexandre verneau
6,535 Points

My solution to the challenge. Any feedback? 😀

let html = '';

for ( let i = 0; i < pets.length; i++) {
  html += `<h2> ${pets[i].name}</h2>
      <h3>${pets[i].type} | ${pets[i].breed}</h3>
      <p>Age: ${pets[i].age}</p>
      <img src= ${pets[i].photo} alt="Australian Shepherd">`;

}

document.querySelector("main").insertAdjacentHTML('beforeend', html);

1 Answer

Rohald van Merode
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Rohald van Merode
Treehouse Staff

Nice solution you got there Alexandre verneau 🔥

Your code is well written and easy to read so no real feedback from me other than keep up the great work 😄