Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Web Programming with HTML5 CSS and JavaScriptb
Quiz 9: Additional Javascript Basics: Window Object, If Statement, Strings, Numbers, and Input Validation
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Question 1
Multiple Choice
When should you use dialog boxes (alert, confirm, and prompt) for input and output?
Question 2
Multiple Choice
Consider the following three strings: "to be or not to be", "to", "tooth" Which of the following shows the strings sorted into ascending lexicographical order (words that are considered less than other words should be at the left) .
Question 3
Short Answer
To embed a backslash character (\) within a JavaScript string, you need to use the ______ escape sequence.
Question 4
Short Answer
Provide a functionally equivalent, shorter version of the following code: window.document.getElementById["name"]
Question 5
Short Answer
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?
Question 6
Short Answer
Suppose a variable x holds "dog". After the following code gets executed, what does x hold? x += "fish";
Question 7
Short Answer
When the following code executes, what message does the dialog box display? var month = "January"; if (month.toLowerCase() == "january") { alert("It is " + month + "!"); }
Question 8
Short Answer
After the following code executes, what does x hold? var location = "Taos, NM"; var x = location.charAt(location.length - 1);
Question 9
Short Answer
After the following code executes, what does x hold? var animal = "porcupine"; var x = animal.lastIndexOf("p", 3);
Question 10
Short Answer
What does the following expression evaluate to? 39 % 10 / 4
Question 11
Multiple Choice
Which of the following is a function of the <code>window</code> object's <code>location</code> property?
Question 12
Multiple Choice
What is the syntax for generating a dialog that displays a message and does not receive input?
Question 13
Multiple Choice
What is the syntax for generating a dialog that prompts the user to answer yes or no to a question?
Question 14
Multiple Choice
What is an <code>if</code> statement's condition?
Question 15
Multiple Choice
An <code>if</code> statement is an example of a:
Question 16
Multiple Choice
Which of the following statements is correct regarding an initialization statement?
Question 17
True/False
The <code>window</code> object's <code>screen</code> property holds information about the monitor that is being used.
Question 18
True/False
A named constant is a special variable whose value is fixed.
Question 19
Short Answer
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.