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
Performing Calculations
True or False
1
Numbers entered into a text field are actually stored as strings.
A)
TRUE
B)
FALSE
2
In JavaScript, the spaces on either side of a mathematical operator in an expression (for example, 2 + 2) are required.
A)
TRUE
B)
FALSE
3
alert(Math.floor(3.14159)) would display 4
A)
TRUE
B)
FALSE
4
The statement var PI = Math.parseFloat("3.14159") assigns the number 3.14159 to the variable PI.
A)
TRUE
B)
FALSE
5
The statement var PI = parseFloat("3.1-4159") assigns the number 3.1 to the variable PI.
A)
TRUE
B)
FALSE
6
According to our text, a global variable may be referenced in any script in a source document.
A)
TRUE
B)
FALSE
7
It is a good practice to never omit the var keyword when declaring variables.
A)
TRUE
B)
FALSE
8
A variable declared without the var keyword always has global scope.
A)
TRUE
B)
FALSE
9
It is a good practice to declare all global variables at the beginning of a script, as it makes the script more readable.
A)
TRUE
B)
FALSE
10
The statement alert(Math.pow(2, 3)) would display 9
A)
TRUE
B)
FALSE
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
.