Exercise
It’s important you have a solid understanding of how functions work, so let’s put your skills of observation to the test and get you writing your own function. Once again, we are going to carry out this exercise inside the Google Chrome JavaScript console.
One of the main functions of JavaScript is to present information to your users in ways that are not possible with pure CSS and HTML. Here are some of the ways that JavaScript can output information:
Let’s look into these four different ways of presenting information in JavaScript in more detail.
Let’s look again at our earlier example which introduced us to JavaScript and illustrated this technique of outputting text using the inner HTML method.