This JS written by Don Sinclair.

The div that changes its text content.

This example demonstrates repeating actions/functions periodically and using if statements to change the text/html of a div using innerHTML.

See JavaScript If...Else Statements for a reference on if statments.