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 trialRod R
3,050 Points'undefined' error for template literal practice
my practice code updates aren't working- the html displays 'undefined' and I found no js errors in the console. where did I go wrong?
2 Answers
KRIS NIKOLAISEN
54,970 PointsAll I did was delete the extra line after your return statement here:
function createPlanetHTML(planet) {
return `<div class="card">
and it appears to be working
Rod R
3,050 PointsThank you both
Emmanuel C
10,636 PointsEmmanuel C
10,636 PointsIt would be safer to put that string in a variable and return the variable instead.