Randomly Generated Haiku
(Adapted from a Logo program by John
Amaro)
Click the HAIKU button to see
a randomly generated poem. A haiku is based on a syllable pattern -
usually three lines with a 5 -7 -5 syllable pattern. Click several
times to see different versions.
The JavaScript in this page makes extensive use of arrays. Each type of
word (e.g., noun4 or verb1) is chosen randomly from the array and put
into a "textarea" in a specified sequence (array names are shown):
- Verb with "ing" (verbing) + UPON + noun1 (go to next line)
- adjective + noun2 + verb1 + FROM THE + noun3 (go to next line)
- OF THE noun4