That is, why would a page need to do any of that except as a classroom exercise?
Wouldn't your run of the mill web author have a design spec that would never read like what you posted?
Bob
can some help with a design that
Add JavaScript to HTML pages. The pages should, as a minimum requirement, include the following features:
One or more JavaScript functions that return a value
One or more arrays
For or while loops
Client-side validation
One or more event handlers
Changes to one or more page elements using DOM scripting
Hoping to receive solution soon

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic