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 trialMary Paul
13,792 PointsH1 not printing - Some javascript math practice
Hey, so trying to do this and not sure what I'm doing wrong- the program runs, alerts and inputs pop up, but the h1 below never prints. Is it because of the updates? What am I missing?
let message = "<h1>Math with the numbers" + x + " and " + y + "</h1>";
Thanks.
2 Answers
Mary Paul
13,792 PointsI'm honestly not sure what happened but when I switched to template literals it started working! Thank you.
Matt Brock
28,330 Points:)
Matt Brock
28,330 PointsHey Mary! Glad you got it working. You can mark the question as solved by selecting a 'Best Answer' :) And if you can, share your code that worked so we can all learn from it!
Matthew Long
28,407 PointsMatthew Long
28,407 PointsAre you selecting the element? Try logging message out to the console.