Exam 9: Additional Javascript Basics: Window Object, If Statement, Strings, Numbers, and Input Validation
Exam 1: Introduction to Web Programming28 Questions
Exam 2: Coding Standards, Block Elements, Text Elements, and Character References30 Questions
Exam 3: Cascading Style Sheets (CSS)29 Questions
Exam 4: Organizing a Pages Content With Lists, Figures, and Various Organizational Elements30 Questions
Exam 5: Tables and Css Layout30 Questions
Exam 6: Links and Images30 Questions
Exam 7: Image Manipulations, Audio, and Video30 Questions
Exam 8: Introduction to Javascript: Functions, Dom, Forms, and Event Handlers28 Questions
Exam 9: Additional Javascript Basics: Window Object, If Statement, Strings, Numbers, and Input Validation30 Questions
Exam 10: Loops, Additional Controls, Manipulating Css With Javascript29 Questions
Exam 11: Object-Oriented Programming and Arrays30 Questions
Exam 12: Canvas30 Questions
Exam 13: Web Development and HTML/CSS98 Questions
Select questions type
A dialog box is a control that supports verbal two-way communication between the user and the computer.
Free
(True/False)
4.9/5
(43)
Correct Answer:
False
Provide a functionally equivalent, shorter version of the following code:
window.document.getElementById["name"]
Free
(Short Answer)
4.8/5
(43)
Correct Answer:
document.getElementById["name"]
When should you use dialog boxes (alert, confirm, and prompt) for input and output?
Free
(Multiple Choice)
4.9/5
(39)
Correct Answer:
B
When the following code executes, what message does the dialog box display?
var month = "January";
if (month.toLowerCase() == "january") {
alert("It is " + month + "!");
}
(Short Answer)
4.7/5
(33)
To break/split a string in JavaScript, you should terminate the first part of the string with a closing quote, insert a(n) ______, and start the next line's continuation string with an opening quote.
(Short Answer)
4.8/5
(43)
The following code generates a dialog box that contains a question and an input box:
prompt("What's your favorite color?", "");
Initially, what displays inside the input box?
(Short Answer)
4.7/5
(40)
Suppose a variable x holds "dog". After the following code gets executed, what does x hold?
x += "fish";
(Short Answer)
4.7/5
(33)
What is the syntax for generating a dialog that displays a message and does not receive input?
(Multiple Choice)
4.8/5
(32)
The <code>window</code> object's <code>screen</code> property holds information about the monitor that is being used.
(True/False)
4.8/5
(33)
A(n) __________ is a pictorial representation of the logic flow of a computer program.
(Short Answer)
4.9/5
(42)
Proper coding conventions suggest that when there are JavaScript statements inside of braces ({}), you should do which of the following?
(Multiple Choice)
4.8/5
(42)
After the following code executes, what does x hold?
var animal = "porcupine";
var x = animal.lastIndexOf("p", 3);
(Short Answer)
4.8/5
(33)
How can you round a price variable's value to the hundredths place (e.g., 204.89)?
(Multiple Choice)
4.8/5
(41)
A block statement (zero or more statements surrounded by braces) can be used anywhere a standard statement can be used.
(True/False)
4.7/5
(43)
For the "if, else if, else" form of the if statement, if a condition is found to be true, that condition's block statement is executed. Then, all the other conditions are skipped, and control flows down to the statement below the entire if statement.
(True/False)
4.9/5
(38)
The window object is known as the global object because all of its members are global.
(True/False)
4.8/5
(33)
Suppose you have a variable named character. What is the best way to assign a double quote (") to character?
(Multiple Choice)
4.8/5
(33)
Showing 1 - 20 of 30
Filters
- Essay(0)
- Multiple Choice(13)
- Short Answer(10)
- True False(7)
- Matching(0)