Docsity

CSE 3 Fall 2006 Quiz 4 - JavaScript and Vista, Exercises of Computer Science

Toggle sidebar
bg1
Signature ____________________ Name _____________________
cs3fa_____
Student ID ___________________ Score:
Quiz 4
CSE 3
Fall 2006
Circle the correct answer.
1. In JavaScript, local variable declarations are placed:
A. inside a function definition
B. in the parens ( ) of a function
C. after the keyword local
D. inside <script> </script> tags
2. The JavaScript statement that is used to insert HTML code or text into a page as it is being rendered:
A. document.render()
B. document.insert()
C. document.print()
D. document.write()
3. In the talk about Microsoft Vista, the key sequence to flip through the open windows as a 3D stack:
A. <Windows>+<Tab>
B. <Alt>+<Tab>
C. <Control>+<Tab>
D. <Shift>+<Tab>
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.X.Y.Z = 420; which of the following naming is correct:
A. attribute Z on input element Y in form X on this document
B. attribute X in input element Y in form Z on this document
C. input element X in form Y with attribute Z on this document
D. attribute document in input element Z on form Y in table X on this html page
(Over)
pf2

Partial preview of the text

Download CSE 3 Fall 2006 Quiz 4 - JavaScript and Vista and more Exercises Computer Science in PDF only on Docsity!

Signature ____________________ Name _____________________

cs3fa_____

Student ID ___________________ Score:

Quiz 4

CSE 3

Fall 2006

Circle the correct answer.

  1. In JavaScript, local variable declarations are placed: A. inside a function definition B. in the parens ( ) of a function C. after the keyword local D. inside tags
  2. The JavaScript statement that is used to insert HTML code or text into a page as it is being rendered: A. document.render() B. document.insert() C. document.print() D. document.write()
  3. In the talk about Microsoft Vista, the key sequence to flip through the open windows as a 3D stack: A. + B. + C. + D. +
  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 tag are usually enclosed in A. tags B. if or if-else statements C. tags D.

    tags
  6. Given the assignment document.X.Y.Z = 420; which of the following naming is correct: A. attribute Z on input element Y in form X on this document B. attribute X in input element Y in form Z on this document C. input element X in form Y with attribute Z on this document D. attribute document in input element Z on form Y in table X on this html page

(Over)

  1. Math.random() returns a pseudo-random value in the range: A. 0 - MAX_INT B. -MAX_INT - +MAX_INT C. 0 - .99999999... D. 0 - 1
  2. The event handler attribute for a button is: A. onPush B. onSelect C. onClick D. onButton
  3. Which of the following would correctly produce the string "Hello World" in JavaScript: A. Hello + World B. "Hello '+' World" C. "Hello" + "World" D. 'Hello' + " " + 'World'

Fill in the blanks.

  1. The logical AND operator/symbol in JavaScript is _________.
  2. The year 2200 _________(is/is not) a leap year.
  3. What is the name of the graphic viewer/editor for PCs I recommended in class ____________________.
  4. The inequality operator/symbol in JavaScript is _________.
  5. To group multiple statements together to form a block (or compound statement) associated with a JavaScript function definition you use _____________________.
  6. Fill in the blank to create a text box with an initial value of 42 in the text box.