Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
You've learned three different ways to output messages with JavaScript. Let's put these pieces together and write a small program using those methods.
Resources
alert()
– MDNconsole.log()
– MDNdocument.write()
– MDN- Other ways to clear the console
- Grammar and types – MDN
Code Snippet
alert("Hello. Thanks for visiting!");
console.log("Hello from the console.");
document.write("<h1>Welcome to my web page.</h1>");
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Tao Zhang
3,546 PointsHello, I am wondering if anyone has a simpler replacement for the command document.write("")?
Posted by Tao ZhangTao Zhang
3,546 Points2 Answers
-
Henk Jan Borghuis
11,986 Points2 Answers
-
Christian Wilcots
1,773 Points0 Answers
-
AHARON YOSEF
2,413 Points2 Answers
-
Gasser Elshafei
489 Points0 Answers
-
lindsaygoddard
Full Stack JavaScript Techdegree Student 4,752 Points5 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up