Ans Doc232Y

CLICK HERE TO DOWNLOAD THIS ANSWER INSTANTLY

A method of locating bugs in a JavaScript program is to transform lines that you think may be causing problems into:
trace routes
write( ) or writeln( ) modules
comments
functions
Question 2
Which of the following if statements is logically incorrect?
if (number1 < 5)
document.write(number1);
if (number2 <= 5) ; document.write(number2); if (number3 > 5)
document.write(number3);
if (number4 < 5) {
document.write(number4);}
Question 3
In Script Debugger, what command allows you to skip function calls?
Step Into
Step Over
Break Out
Skip Over
Question 4
In Script Debugger, a breakpoint is a statement in the code at which program execution enters what mode?
pause
step out
break
debugging
Question 5
In JavaScript, what is the examination of individual statements in an executing program called?
commenting
tracing
debugging
trace.route
Question 6
The creation of an infinite loop is an example of a(n) _____ error.
syntax
logic
run-time
scripting
Question 7
In Script Debugger, what command can end a debugging session without executing the rest of the program?
Step Out
Run
Stop Debugging
Break
Question 8
In JavaScript, _____ errors are problems in the design of a program that prevent it from running as you anticipate it will run.
syntax
logic
run-time
scripting
Question 9
In Script Debugger, what command ends the debugging session and executes the rest of the program normally?
Break
Run
Stop Debugging
Step Out
Question 10
In Script Debugger, what command executes an individual line of code and then pauses until you instruct the debugger to continue?
Run
Step Over
Step Into
Step Pause
Question 11
The cause of an error in a particular statement is often the result of an error in _____ of code.
the preceding line
the next module
a preceding module
the next line
Question 12
Which of the following statements causes a syntax error?
myDate = new Date( ) ;
return true;
document.writln(“this is a test”) ;
window.alert(“this is a test”) ;
Question 13
In Script Debugger, what command executes all remaining code in the current function?
Step Out
Run
Step Into
Step Over
Question 14
Consider the following function, which causes an error because it is missing both the opening and the closing braces ({ }) . What type of error is this?
function missingClosingBrace()
var message = “A missing closing brace.”;
window.alert(message) ;
syntax
debugging
logic
run-time
Question 15
In the following line of code the writeln( ) method attempts to print the contents of a variable named messageVar. If the messageVar variable is not declared what type of error will occur?
document.writeln(messageVar);
syntax
debugging
logic
run-time
Question 16
What is the term that refers to the order in which procedures, such as functions, methods, or event handlers, execute in a program?
stack call
stack window
window script stack
call stack
Question 17
In JavaScript, _____ errors occur when the interpreter fails to recognize code.
logic
syntax
compiling
debugging
Question 18
Form text fields only store data in the form of _____.
text strings and numeric values
text strings
numeric values
Boolean values
Question 19
Which statement correctly appends a query string stored in savedData to a URL?
top.location.href = RegistrationForm.html + “?” + savedData;
top.location.href = “RegistrationForm.html” + “?” + savedData;
top.location.href = “RegistrationForm.html” + savedData;
top.location.href = “RegistrationForm.html + ? + savedData”;
Question 20
Each individual server or domain can store a maximum of _____ cookies on a user’s computer.
30
20
300
200
Question 21
Which function best handles reading special characters that are included in a cookie?
encodeURI( )
decodeURI( )
escape( )
unescape( )
Question 22
All of the following are attributes of the cookie property except:
expires
path
domain
href
Question 23
The secure attribute of the cookie property holds :
a value of 0 or 1
a value of “Yes” or “No”
a Boolean value of true or false
a value of “HTTP” or “HTTPS”
Question 24
Assigning a new value to the cookie property:
replaces the last value
replaces the last value only if the browser cookie limit will be exceeded
builds a list of cookies
None of the above
Question 25
All literal strings and string variables in JavaScript are represented by the _____ object.
Text
Data
Char
String
Question 26
Which of the following is a method of the String object that will return the position number in a string of the first character in the text argument?
lastIndexOf( )
firstIndexOf( )
index( )
indexOf( )
Question 27
When a query string is passed from one Web page to another, it is assigned to the _____ property of the Location object.
search
history
URL
link
Question 28
By default, a cookie is available to all Web pages _____.
in the same directory
on the same computer
on the same server
on the same network
Question 29
To remove the question mark at the start of the query string use the:
substring( ) method
string( ) method
charAt( ) method
toString( ) method
Question 30
You have stored data that will be needed in a calculation in a form text field. What do you need to do before the data can be used in a calculation?
Use the parseInt( ) function to convert the text field to an integer.
Use the parseNum( ) function to convert the text field to an integer.
Use the ConvertInt( ) function to convert the text field to an integer.
It is not necessary to convert the data. JavaScript handles this automatically.
Question 31
Which of the following are reasons for maintaining state information between different visits to a Web site with cookies?
Web page customization based on user preferences
Shopping carts that store order information for commercial Web sites
Counters to keep track of how many times a user has visited a site
All of the above
Question 32
Which of the following attributes should best be omitted when working with client-side JavaScript?
name
path
domain
secure
Question 33
Netscape developed _____ to encrypt data and transfer it across a secure connection.
HTTPS
Secure Sockets Layer
Secure Information Transfer
Secure Data Encryption
Question 34
Cookies can be temporary or:
static
permanent
persistent
nonvolatile
Question 35
The most important part of the DOM is the Document object.
True
False
Question 36
DHTML 4.0 is the current standard approved by W3C.
True
False
Question 37
Which of the following is a method that will allow you to create simple animations?
setTime( )
setInterval( )
setAnimate( )
setTimeInterval( )
Question 38
Through the _____ object, you can access other objects that represent elements on a Web page.
Document
Window
Image
Link
Question 39
The _____ property of the Image Object is described as a name assigned to an element.
href
URL
src
name
Question 40
Which of the following is a property that has a Boolean value?
border
complete
vspace
lowsrc
Question 41
You can simulate dynamism with:
hypertext links
the element
the element
the image property of the Document object
Question 42
Some older browsers do not display any content in a new window until you execute the _____ method.
open( )
close( )
write( )
writeln( )
Question 43
The write( ) and writeln( ) methods cannot be used to change content after a Web page has been rendered.
True
False
Question 44
Which of the following can be used to change content after a Web page has loaded?
write( ) method
writeln( ) method
title property
URL property
Question 45
A technique for eliminating multiple downloads of the same file is called _____.
image storing
image holding
image caching
image persistency
Question 46
To be certain that all images are downloaded into the cache at the appropriate time, you should use the _____ event handler of the Image object.
onclick
onopen
onload
onclose
Question 47
In order to eliminate erratic loading and slow moving animations, use _____.
image holding
image storing
cookies
image caching
Question 48
The DOM represents the Web page displayed in a window.
True
False
Question 49
Images are cached using the _____ constructor of the Image object.
Src( )
Cache( )
Image( )
URL( )
Question 50
Image storing temporarily stores image files in memory on a local computer.
True
False