
Signature ____________________ Name _____________________
cs3x_____
Student ID ___________________ Score:
Quiz 3
CSE 3
Summer 2006
Fill in the blanks.
1. A random number generated by
Math.random()
in JavaScript is always between ______ and ______.
2. ___________________ is the term commonly used to refer to values represented in base 2.
3. To group multiple statements together to form a block (group of statements) associated with a
JavaScript if or for statement or a function you use _____________________.
4. Spreadsheet formulas start with ____________.
5. The equality operator/symbol in JavaScript is _________.
6. Variables declared inside a function are ____________ in scope.
Circle the correct answer.
7. Which of the following iterates 10 times?
A.
for (i = 1; i <= 11; i = i + 1)
B.
for (i = 10; i >= 0; i = i - 1)
C.
for (i = 0; i < 10; i = i + 1)
D. all of the above
8. In JavaScript, the plus sign always means:
A. add 1
B. addition
C. concatenation
D. B or C
9. Which of the following is the correct form to specify a range of cells in a spreadsheet like Excel:
A. 2B:5F
B. C3-E8
C. K9:N11
D. G4/J9
(Over)