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 JavaScript Basics Working with Strings Display the Value of a String on a Page

is this valid though?

This is my code to the challenge:

const shoutout = prompt("What do you want to shoutout?"); let msg = <h1>The message to shout is: ${shoutout.toUpperCase()}</h1>; document.write(msg);

or this

const shoutout = prompt("What do you want to shoutout?").toUpperCase(); const shoutoutMsg = <h2>The message to shout is: ${shoutout}!!!</h2>;

document.querySelector('main').innerHTML = shoutoutMsg;

you can already add the .toUpperCase() method on the prompt to eliminate the additional const

or I'm missing something? please tell me :(

1 Answer

Otherwise valid but you are missing backticks around the message value