Quiz 02/18/2014 use Lecture/0218.html
1. How many second in 3500 milliseconds?
2. If I want all pict[] elements to have an alt value
( alt = 'magic string')
what line of code would I add and where would it go.
3. Suppose you initialize pict[] so it points to 7 Image objects.
Give the 4 values of cur, starting at cur = 5
5, 6, 0, 1
4. Suppose newImg is going to initialize both the src attribute
and the alt attribute of the new Image added to pict[].
Give the new function definition of newImg()
// original function cdefinition
function newImg (sourceURL, param2) {
zImage = new Image();
zImage.alt = param2;
zImage.src = sourceURL;
return zImage;
}
and an example function call
// an original function call
picts[0] =
newImg("http://people.emich.edu/zbahorski/images/2.jpg",
"bahorskiImage");