To Lecture Notes

IT 238 -- Apr 29, 2026

Review Exercises

  1. The following code is supposed to sort the array a in numerical order. What is wrong? How can you fix it?
    var arr = [45, 24, 113, 19, 1, 228];
    arr.sort( );
    document.writeln(arr);
    
  2. Write JavaScript code to enlarge an image to 150% width and 150% height when the mouse enters (is moved over without clicking) the image. You can use this image: earth-from-space.jpg
  3. Look at this Controls Example:
    Web Page    Source Code
  4. In an <img> element in the body, when the window is loaded or refreshed, randomly display one of these images: heads.png or tails.png.

Event Object Properties and Methods

Classes

Project 3

Practice Problem

Review of CSS Selectors

The DOM

Hiding and Displaying Elements