Lab 8: JavaScript Exercises


Note:
Lab attendence has been slipping. I will be carefully taking attendence in lab so make sure you show up! Showing up does not mean coming for the first 5 minutes or coming to read email the whole time. Javascript is difficult and you should be making as much use of my help as you can.

Create a link on your main web page to a page containing the list of your javascripts. Each item in the list is a link to an individual web page with a single javascript example. On each individual web page you should include several sentences explaining what your javascript is supposed to be doing. Also, remember that when writing scripts you should always include text letting the user know what is being calculated and printed. For example, don't just print document.write(age), instead print document.write("My age is = " + age).

The examples you should have are the following:

  1. Include at least 3 different examples from Chapter 2. For each example, make minor changes to the javascript to show that you understand how the script works.
  2. Include at least 2 examples of basic loops without arrays. For example, compute the average of a set of numbers or print out all odd numbers in some range backwards, etc. Don't do exactly what I did in class. Modify it at least a little.
  3. Include at least 2 examples of loops using arrays that you have created. For example, in class we created an array called ages. Create several arrays of your choice and experiment with printing then out and with manipulating their values.
  4. Include at least 2 examples of loops using existing arrays. For example, in class we printed out the plugins and forms arrays. Look in the appendix for other existing arrays and experiment with printing out their properties. Use examples that are different from the ones in Chapter 2 or the ones done in class.

This is due on Monday, Nov 6. I will have you demo some of it in lab. The rest of it I will check on my own.


[top]

[Syllabus]

[Home]