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 trialMichael Kalmykov
8,919 Pointsnot a question but I thought I'd post a different method for the shout app.
I paused the video immediately after the instructions and before the instructor wrote the code to make the shout app work.
I created this using knowledge from previous lessons in this course
var gtYll = prompt('Enter your phrase here'); gtYll = gtYll + ' !'; document.write(gtYll.toUpperCase());
variable is Goat Yell :)
1 Answer
Steven Parker
231,271 PointsThat does work, but the alert method might be a bit more intuitive way to produce a one-line response to a prompt.
Also the method in the video preserves the original input unmodified, which might be useful in a more elaborate program. You could accomplish that your way with a very small modification:
var gtYll = prompt('Enter your phrase here'); document.write(gtYll.toUpperCase() + ' !');
Good initiative. You're likely to find several opportunities to do the same thing in this and future courses.