Last Modified: 12/9/98
[Previous] [Home] [Next]

JavaScript Homework


Credit: Mulchaey et al (ST Sci/UMD/NASA)

Here are some optional homework assignments that you might wish to try:

  • Write a simple JavaScript/HTML program which prints out, using a plain text window, the line "Mary had 26 lambs" when you click on a button (see this for the result.
  • Write a JavaScript/HTML program that computes the average GPA of a number of students. See this for the result.
  • Write a JavaScript program that replaces one GIF image with another when you click a button. See this for the result.
  • In the section "Programming with JavaScript" in this class, there is an example: "Creating and manipulating frames source and execution" that has a bug. When you click on "Next Subarea" when you are in Area 1, the image shows up as a red X. Pleas find and correct this bug.

[Previous] [Home] [Next]