Quiz 2
Quiz 2
1. Inside which HTML element do we put the JavaScript? (Circle one) a. <script> b. <javascript> c. <scripting> d. <js> 2. When a programming language is strongly typed: (Circle one) a. The compiler checks if values assigned to variables are the correct type b. The run-time system checks if values assigned to variables are the correct type c. The browser checks if values assigned to variables are the correct type d. No type checking need be done e. None of these 3. What is the correct way to write a JavaScript array? (Circle one)
a. b. c. d.
var txt = new Array("tim","kim","jim") var txt = new Array(1:"tim",2:"kim",3:"jim") var txt = new Array="tim","kim","jim" var txt = new Array:1=("tim")2=("kim")3=("jim")
4. The following are always objects in Javascript: (Circle all that apply) a. Numbers b. Strings c. Arrays d. Functions e. Parameters 5. The Document Object Model (DOM): : (Circle all that apply) a. Is an internal map of all the objects that exist on a web page b. Defines the interface between HTML and application programs c. Binds HTML tags as Javascript objects and HTML tag attributes as Javascript properties d. Defines a hierarchical structure of the objects on a web page e. Attempts to be a successor to DHTML 6. DHTML is a. HTML 4 with tags for creating dynamic pages b. HTML 4 +CSS + Javascript c. Simple HTML 4 used in a dynamic way d. HTML 4 + Applets e. None of these
7. What is the correct JavaScript syntax for opening a new window called "window2"? a. window.open("http://www.wpi.edu","window2")