
Signature ____________________ Name _____________________
cs3f_____
Student ID ___________________ Score:
Quiz 4
CSE 3
Fall 2005
Circle the correct answer.
1. In JavaScript, variable declarations are placed:
A. inside <head> </head> tags
B. in the parens ( ) of a function
C. anywhere in a program
D. inside <script> </script> tags
2. All of the following are illegal JavaScript identifiers (variable or function names) except:
A. Nine-Inch-Nails
B. 9" Nails
C. 9_Inch_Nails
D. N9_1nch_N8ls
3. In JavaScript, 17%5 is:
A. 17 percent times 5
B. 2
C. 3
D. the same as 17/5
4. In the if statement – if ( exp ) – the exp part must be:
A. an assignment statement
B. a boolean statement
C. a string
D. an arithmetic expression (an expression using arithmetic operators like +, -, *, /)
5. Input controls like buttons using the <input> tag are usually enclosed in
A. <script> </script> tags
B. if or if-else statements
C. <form> </form> tags
D. <p> </p> tags
6. Given the assignment document.A.B.C = 420; which of the following naming is correct:
A. attribute A in form B in input element C on this document
B. attribute C in input element B in form A on this document
C. input element A in form B with attribute C on this document
D. attribute document in input element A on form B in table C on this html page
(Over)