Here are examples that go with Lecture 5, an introduction to JavaScript. Prior to 2017 these examples came in the second half of the semester, following the presentation of PHP. The examples still use PHP for common elements. Glance at this code but otherwise ignore it for now.

Keep in mind that some of these examples are dated. I am maintaining them because the simplistic stylistic conventions that make them dated also helps bring to the surface some of the underlying mechanics of JavaScript. In particular, how JavaScript relates to the Object Model (DOM) that are hidden by more modern techniques; most notably jQuery.

Here is a file you may download with the actual php content: