NEW
Font size
WorksheetsJavaScript Cert Prep
Total questions: 10
Worksheet time: 5mins
In JavaScript, a logic error:
is another term for a run-time error
is another term for a syntax error
is harder to troubleshoot because debuggers do not detect it
can be detected and repaired automatically with an advanced debugger
Watchpoints can assist a developer in troubleshooting
run-time errors
syntax errors
logic errors
browser errors
What is the result of this code?
<script type="text/javascript"> function ClientMessage(){ var message = "Welcome!"; alert(message); } </script>
When you enter the page, the alert box will display
When you enter the page, you will be warned that there is unfinished JavaScript to run.
The page will ignore the function, so a blank page will display on entry and exit.
When you enter the page, there will be a JavaScript error because you cannot load an alert box.
Which String object method can be used to test user input?
The link() method
The toLowCase() method
The test() method
The indexOf() method
The JavaScript toUpperCase() method is an example of:
a calling statement.
an argument.
a user-defined function
a built-in function
Which JavaScript statement should you use to execute a block of code for as long as a certain test condition is true, with the guarantee that the code block will execute at least once?
if
do
if....else
do...while
Which of the following JavaScript code segments correctly accesses the user's entry in a text object named myTextBox in a form named myForm?
var myVar;
myVar = document.myForm.myTextbox.text;
var myVar;
myVar = document.myForm.myTextbox.input;
var myVar;
myVar = document.myForm.myTextbox.value;
var myVar;
myVar = document.myForm.myTextbox.content;
Which database operation can AJAX perform when used with SQL, a server-side language and a database?
Modify database security permissions, including changing the database owner
Create custom database views and stored procedures
Retrieve information from a database and display it back to the page originating the request
Update the database schema and table relationships
Which method is used to request and capture data from a user?
The prompt() method
The alert() method
The open() method
The confirm() method
Which of the following code segments properly scripts a JavaScript for statement?
for (var i = 0, i <= 10, i--) {
document.write("loop number " + i + "<br />");
}
for (var i = 0; i >= 10; i++) {
document.write("loop number " + i + "<br />");
}
for (var i = 0; i <= 10; i++) {
document.write("loop number " + i + "<br />");
}
for (var i = 0, i >= 0, i--) {
document.write("loop number " + i + "<br />");
}
