Student Center
|
Instructor Center
|
Information Center
|
Home
Sample Code
Choose a Chapter
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Chapter 15
Chapter 16
Chapter 17
Multiple Choice Quiz
True or False
E-Lectures
Feedback
Help Center
Programming the Web Using XHTML and JavaScript
Larry Randles Lagerstrom
Objects and Variables
Multiple Choice Quiz
1
A module of code that belongs to an object is called a(n) ________
A)
state variable
B)
parameter
C)
method
D)
argument
2
A software object consists of two things bundled together:
A)
behavior and methods
B)
states and properties
C)
messages and methods
D)
data and code modules
3
In the statement changeGrind("fine"), fine is called a(n) _________
A)
variable
B)
method
C)
property
D)
parameter
4
Which is not a valid floating point number?
A)
3.14159
B)
2,718.00
C)
.3
D)
3.
5
Which is NOT one of JavaScript's three data types?
A)
numbers
B)
Boolean
C)
string
D)
complex
6
What is the value of the variable named sayWhat after the following lines of code are executed? var sayWhat = "hello" sayWhat = "goodbye"
A)
"hello"
B)
"goodbye"
C)
undefined
D)
none of the above
7
What is the value of the variable named sayWhat after the following lines of code are executed? var sayHello = "hello", sayGoodbye = "goodbye" sayHello = sayGoodbye
A)
"hello"
B)
"goodbye"
C)
"sayGoodby"
D)
"sayHello"
8
What is displayed by the call to alert()? var sayHello = "hello" alert("sayHello")
A)
"hello"
B)
"sayHello"
C)
"enter name"
D)
"goodbye"
9
What is displayed by the call to alert()? var first = "Ada", last = "Lovelace" alert("hello " + first + last)
A)
hello first last
B)
hello Ada Lovelace
C)
hello + first + last
D)
hello + Ada + Lovelace
10
Which statement causes a new HTML document to be displayed in the browser?
A)
location.href = "http://www.cs.uoregon.edu/classes/cis111/"
B)
window.location.href = "http://www.cs.uoregon.edu/classes/cis111/"
C)
both A and B
D)
neither A nor B
2003 McGraw-Hill Higher Education
Any use is subject to the
Terms of Use
and
Privacy Policy
.
McGraw-Hill Higher Education
is one of the many fine businesses of
The McGraw-Hill Companies
.