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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![mohammed mayat](https://secure.gravatar.com/avatar/60430e72cf53b9a959793248857730c7?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
mohammed mayat
4,228 Pointscombining strings
after i enter name, message not printing out, https://teamtreehouse.com/workspaces/33981562
![mohammed mayat](https://secure.gravatar.com/avatar/60430e72cf53b9a959793248857730c7?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
mohammed mayat
4,228 Pointsindex.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="stylesheet" href="css/main.css"> <title>Using the prompt() method.</title> </head> <body> <div class="container"> <h1>Using the prompt() method</h1> <script src="combiningString.js"></script> </div> </body> </html>
combineString.js
var visitor = prompt('What is your name'); var message = 'Hello ' + visitor +". Welcome to treehouse."; message = message + "we are so glad that you came by to visit, "; message += visitor; message += " Plese come again, when you want to learn some more. "; document.write(message);
1 Answer
![Victor Enriquez](https://uploads.teamtreehouse.com/production/profile-photos/141382/micro_AX-250.jpg)
Victor Enriquez
22,766 PointsAfter running your code in the console I can see the message printed in the current browser window. As an alternative you could print it to the console, or as an alert or inside a specific DOM Element.
Kevin Haggerty
4,875 PointsKevin Haggerty
4,875 PointsLink doesn't work. Will need more context! Posting the code will be helpful!