"Python Basics (2015)" was retired on June 22, 2018. You are now viewing the recommended replacement.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed JavaScript Basics!
You have completed JavaScript Basics!
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 upRelated 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