JavaScript: Lesson 2



REMINDERS. If you have not already done so already, please hand in your notes describing the results of posting on your basic web page your essay on completing the square .

If you have not done so already, please finish and hand in the LaTeX exercises:

  1. Exam Package (from Hirschhorn)
  2. Draftcopy: draft watermark
  3. Picins: text flow around boxes


Goal to accomplish during class

Learn more about the basics of JavaScript

In-class Activities

JavaScript

If you have not already done so, please open the following link Voodoo's Introduction to JavaScript You can use this today in lieu of a textbook, as a source of information about JavaScript.

As an editor for today you may want to use HTMLjive, an HTML editor, or load it from a local copy


EXERCISE 1 (Repeated from Last Class).

EXERCISE 2 (Repeated from Last Class).


EXERCISE 3.

Let's start with a look at a simple JavaScript program by the not-so-well-known expert on JavaScript, Ben Karel a.k.a Benihana. View the source code and write a brief summary explaining how each element in the source code is supposed to function. You may want to fiddle with the code to test whether your guesses are correct.

Computing Tables of Numbers

EXERCISE 4. Open Fibonacci Script. View the source

By suitably modifying the Fibonacci JavaScript, produce a script that will compute a factorial (The factorials are 1!=1, 2!=(2)(1!)=2, 3!=(3)(2!)=6, etc.). You can email me the script or, better, put a link to it on your basic web page.

Finished?

If you have done all the above activities, and there is still time left, here are some other activities you can do.


Homework for after class

Relax!

/ Home / Contents /


email to:Martin Karel