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

I'm pressing enter but nothing happens when I run it , only getting the prompt. Why?

1 Answer

Steven Parker
Steven Parker
231,269 Points

This workspace seems to be set up to create a web page using the "preview" button (looks like an eye). What are you doing that displays a prompt (and what is the prompt)?

Also, the code in shout.js creates variables, but does not do anything to display their contents on the page.

I was stuck on 4:20 of the video. He never mentions copy and paste "document.querySelector('main');" into inspect/console. My bad, figured it out...... As far as prompt,"What do you want to shout?" every time I refresh the page.

Steven Parker
Steven Parker
231,269 Points

Congratulations on resolving your own issue.   :+1: