<h1>My First Web Page</h1>
<p id="demo">This is a paragraph.</p>
<button type="button" onclick="displayDate()">Display Date</button>
It's rubbish without a proper explanation. If all I want to do is reverse engineer someone else's code, I won't bother with a tutorial, I'll just search for code examples.
So what do we have in the next few pages that is useful?
This is shown in line 3 of the code quoted above.
This strategy is executed in line 4 of the code quoted above, where the function
displayDate is defined, and in the third from last line, where a button click is set to call the function.
You can place an unlimited number of scripts in your document, and you can have scripts in both the body and the head section at the same time. It is a common practice to put all functions [either] in the head section, or at the bottom of the page. This way they are all in one place and do not interfere with page content.
I thought they might give an example of a .js document, but they did not.
Let's hope the XML lesson is more interesting.