The other thing I added is actually the little window you saw when you first opened this page. These window alerts are important for if you want to tell the user about an error or warn them of something, while making it as difficult to miss as possible.

You make a window alert by typing window.alert() and adding you message into the parenthesis. You can add numbers like 11 or 250,000,000, or you can add the solutions to basic math problems like 3 + 4, and the output would show 7, or you can display text by placing your message within a set of '' or "" quotes.


The onclick function is one of the other things I found in Javascript. Obviously we've used buttons before, but the onclick function allows you to use buttons as more than just a link. It allows you to change the font size of text (that's what I used for my example), you can use it to reveal or hide text and information, or to load different CSS profiles.