Gentle Quiz

Multiple Choice

  1. 1. What HTML tag do you use to tell the broswer there is JavaScript in the file?
    1. <script language="javascript"> </script>
    2. <language="javascript"> </language>
    3. <javascript> </javascript>
    4. <js language="javascript"> </js>

  2. Javascript executes at:?
    1. The Server
    2. The Client
    3. Both the Client and the Server
    4. None of the above

  3. In JavaScript, are the variables Ax and aX the same or different?
    1. same
    2. different

  4. What is the JavaScript variable that you would use to set a cookie?
    1. cookie
    2. javascript.cookie
    3. document.cookie
    4. chocolate.chip

Short Answer

  1. Write an HTML file with embedded JavaScript code which does the following:
    Displays a confirm box with the message:
    "If you are a senior this fall, press OK. Else, press CANCEL."

    If the user presses OK, then display:
    "Congratulations Class of 2003!"

    If the user presses CANCEL, then display:
    "You are not graduating yet."