Lab 2 - variables and fuctions

Lab 2 objective

In this assignment you will use variables and a function.

Raven

Build a page named lab2.html

Put a link in your index page to your new page.

The text for the first stanza of The Raven by Edgar Allen Poe is given in the next paragraph.

Once upon a midnight dreary, while I pondered, weak and weary,
Over many a quaint and curious volume of forgotten lore,
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door.
"'Tis some visitor," I muttered, "tapping at my chamber door-
Only this, and nothing more."

Put the first 4 lines in your page using xhtml, without using JavaScript.
Use document.write() in an external JavaScript file to put the last two lines in your page. In the JavaScript, use a variable to contain the fifth line, and another variable to contain the last line. The spacing and line breaks should be exactly as you see them here. Note that is a double quote followed by an apostrophe before Tis.

Second section

Put a thick horizontal rule across the page after the Raven stanza.

Use another JavaScript file. In this file put four vaiables with the following information:

  1. Your age in years, as an integer
  2. Your height in meters, as a floating point number
  3. Your given name or nickname, as a string
  4. The Boolean value true

If you do not want to give your age, height, and name, use someone else's data.

Display the informtion from the variables, with accompaning text telling what it is.

At the bottom, put a link back to your index page.