Practice Quiz 1

  1. What is the difference between a method and a function?
    A. method is tied to an object
    B. method's name isn't followed by parentheses
    C. function doesn't contain any variables
    D. function must be passed parameters

var ideas = new Array(4);

ideas[1] = "Type \"about:mozilla\" to get an odd message from the Netscape team."
ideas[2] = "Hold down shift when pressing reload to clear a page\'s items from cache."

Quote = ideas[Math.round((ideas.length -1) * Math.random())]

  1. the index range for ideas will be
    A. 0 - 1
    B. 1 - 4
    C  0 - 3
    D. none of the above
  1. if the index of ideas is 1 then document.write(Quote) will produce
    A. Type \"about:mozilla\" to get an odd message from the Netscape team.
    B. Type "about:mozilla" to get an odd message from the Netscape team.
    C. Hold down shift when pressing reload to clear a page\'s items from cache.
    D. Hold down shift when pressing reload to clear a page's items from cache.
  1. the notation javascript:someFunction() is used to call
    A. someFunction from anywhere in the script in "general"
    B. someFunction from a hyperlink
    C. someFunction from an image
    D. none of the above
  1. setTimeout("document.images['ball'].src = imageArray[0].src", 100); is a valid statement
    A. true
    B. false
  1. Which of the following is a Method that makes JavaScript animation possible?
    A. timer()
    B. setTimeout()
    C. countdown()
    D. wait()
  1. selectedIndex is associated with the <SELECT> object
    A. true
    B. false

If now.getHours() == 18 & now.getMinutes() == 18

  1. Math.floor(now.getHours() / 10) will equal
    A. 1.8
    B. 2
    C. 1
    D. none of the above
  1. now.getMinutes() % 10 will equal
    A. 18
    B. 2
    C. 8
    D. none of the above
  1. Math.random() goes from 0 - 1 (not including 0 or 1)
    A. true
    B. false

You have:    answers correct out of a possible ten.

The question numbers that were not correct are: