Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
99 Cards in this Set
- Front
- Back
A ____ error is a flaw in a program's design that prevents the program from running as you anticipate. |
logic |
|
A ____ error occurs when the interpreter fails to recognize code. |
syntax |
|
A ____ error occurs when the JavaScript interpreter encounters a problem while a program is executing. |
run-time |
|
After you evaluate code for exceptions, you can use a ____ statement to perform cleanup or necessary tasks. |
finally
|
|
After you throw an error, you use a ____ statement to handle the error.Select one:
|
catch
|
|
An infinite loop is an example of a(n) ____ error.
|
logic
|
|
Mark 1.00 out of 1.00Flag questionQuestion textThe console.log() debugging method results in messages ____.
|
displayed in the browser console
|
|
The debugging tools built into modern browsers are especially useful in tracking down ____.
|
logic errors
|
|
The window.alert() debugging method results in messages ____.
|
displayed in dialog boxes
|
|
The ____ is the ordered list maintained by a JavaScript processor containing all the procedures that have been called but have not yet finished processing.
|
call stack
|
|
When using the console.log() method to trace bugs, it can be helpful to use a ____ program.
|
driver
|
|
Which of the following JavaScript statements requests that processors remove some features from the language and require more stringent syntax for other features?
|
"use strict";
|
|
Which of the following JavaScript statements works like a breakpoint?
|
debugger;
|
|
Writing values directly to the console is known as ____.
|
logging
|
|
You enclose code that may contain an exception in a ____ statement.
|
try
|
|
You use a ____ statement within a try block to specify an error message.
|
throw
|
|
____ allows programs to handle errors as they occur in the execution of a program.
|
Exception handling
|
|
____ is the temporary suspension of program execution so you can monitor values and trace program execution.
|
Break mode
|
|
A program's ____ is the order in which various parts of the program run, or execute.
|
logic
|
|
The rules of a programming language are known as its ____.
|
syntax
|
|
A set of connected nodes that are not part of a document is known as a(n) ____.
|
document fragment
|
|
In order to make a window the active window, you use the ____ method of the Window object.
|
focus()
|
|
The DOM hierarchy is also known as ____.
|
the DOM tree
|
|
The History object contains a single property, the ____ property, which contains the specific number of documents that have been opened during the current browser session.
|
length
|
|
The ____ method is used in JavaScript to execute code after a specific amount of time has elapsed.
|
setTimeout()
|
|
The ____ method is used to cancel a setTimeout() method before its code executes.
|
clearTimeout()
|
|
The ____ method is used to clear a setInterval() method call.
|
clearInterval()
|
|
The ____ method repeatedly executes the same code after being called only once.
|
setInterval()
|
|
The ____ object allows you to change to a new web page from within JavaScript code.
|
Location
|
|
The ____ object is used to obtain information about the current web browser.
|
Navigator
|
|
When you open a new web browser window, you can customize its appearance using the ____ argument of thewindow.open() method.
|
options
|
|
Which is the correct way to reference the CSS font-family property in JavaScript when using dot notation?
|
fontFamily
|
|
Which is the correct way to reference the href attribute of the element with the id value homeLink?
|
document.getElementById("homeLink").href
|
|
Which method adds a node to a parent node before one or more existing child nodes?
|
insertBefore()
|
|
Which method does NOT return a node list or HTML collection?
|
getElementById()
|
|
Which method returns a single element?
|
querySelector()
|
|
Which method returns all h1 elements in a document?
|
getElementsByTagName("h1")
|
|
Which method returns all elements in a document that match the selector p figure img?
|
querySelectorAll("p figure img")
|
|
Which method returns the element created by the HTML tag pair ?
|
getElementsByClassName("first")
|
|
Which results in a node that exists independently of the DOM tree?
|
createElement()
|
|
For any fields that require numeric values, you can use JavaScript's built-in ____ function to determine whether a user actually entered a number.
|
isNaN()
|
|
In general, modern browsers display validation feedback after the ____ event is triggered by a form.
|
submit
|
|
In modern browsers, which attribute of an input element prevents the form from being submitted if the field is left blank?
|
novalidate
|
|
Instead of document.getElementsByTagName("form")[0], you could use the code
|
document.forms[0]
|
|
Many aspects of the way browsers present browser-based validation feedback are customizable through the properties and methods of the ____.
|
constraint validation API
|
|
The ____ event fires when a form is submitted.
|
submit
|
|
To check a group of fields and trigger an error message if any of them is empty, you use a(n) ____ statement.
|
loop
|
|
To check if an option button is selected, you access the value of its ____ property.
|
checked
|
|
To display no default value on a selection list, you set its ____ property to -1.
|
selectedIndex
|
|
Use of the ____ attribute of the form element is not allowed in the strict DTD for XHTML.
|
name
|
|
Validation errors found by modern browsers are reported in ____.
|
bubbles
|
|
What element property would you use when copying the contents of one text field to another text field?
|
value
|
|
When a control's value is found to be invalid during constraint validation, the ____ event is triggered.
|
invalid
|
|
Which attribute enhances usability in modern browsers?
|
placeholder
|
|
Which attribute toggles off validation of a form when added to the opening tag?
|
novalidate
|
|
Which type value for the input element triggers validation in modern browsers?
|
number
|
|
You can use the CSS ____ pseudo-classes to change the properties of form elements based on their validity status.
|
:invalid and :valid
|
|
You create an empty document fragment using the ____ method.
|
createDocumentFragment()
|
|
You use the ____ method on an object to block the action normally associated with an event.
|
preventDefault()
|
|
A(n) ____ array is an array whose elements are referred to with an alphanumeric key instead of an index number.
|
associative
|
|
A(n) ____ function is a function that is used as the basis for a custom object.
|
constructor
|
|
A(n) ____ is an object that has been created from an existing class.
|
instance
|
|
Objects are also called ____.
|
components
|
|
The code (methods and statements) and data (variables and constants) contained in an encapsulated object are accessed through a(n) ____.
|
interface
|
|
The term ____ refers to information contained within variables or other types of storage structures.
|
data
|
|
The ____ class contains methods and properties for manipulating the date and time.
|
Date
|
|
The ____ class contains methods and properties for performing mathematical calculations in your programs.
|
Math
|
|
The ____ class contains methods for manipulating numbers and properties that contain static values representing some of the numeric limitations in the JavaScript language.
|
Number
|
|
The ____ property is a built-in property that specifies the constructor from which an object was instantiated.
|
prototype
|
|
To add a property to a constructor function, you must add a statement to the function body that uses the ____ keyword.
|
this
|
|
To delete a specific property in a custom object, you use the ____ operator.
|
delete
|
|
To execute the same statement or command block for all the properties within a custom object, you can use the ____ statement.
|
for/in
|
|
When creating an object using a literal, you separate multiple property-value pairs with ____.
|
commas
|
|
When working with a date, JavaScript stores the month as a ____.
|
value from 0-11
|
|
Which class requires you to use a constructor?
|
Date
|
|
Which method of the Math object rounds a value to the next lowest integer?
|
floor()
|
|
Which Number class method can you use to convert a number to a string that is formatted with local numeric formatting style?
|
toLocaleString()
|
|
You can create a function that will be used as an object method by referring to any object properties it contains with the ____ reference.
|
this
|
|
____ refers to cleaning up, or reclaiming, memory that is reserved by a program.
|
Garbage collection
|
|
A pattern that matches the beginning or end of a line is called a(n) ____.
|
^ anchor |
|
Characters contained in a set of parentheses within a regular expression are referred to as a subexpression or ____.
|
subpattern
|
|
Regular expression patterns consist of literal characters and ____.
|
metacharacters
|
|
The fromCharCode() method is called a ____ method because it is not used as a method of any string objects (which can be literal strings or variables) in your scripts.
|
static
|
|
The JavaScript String class includes the ____ method, which creates a new string by combining strings that are passed as arguments.
|
concat()
|
|
The String class ____ property returns the number of characters in a string.
|
length
|
|
The ____ method adds one or more elements to the end of an array.
|
push()
|
|
The ____ method constructs a text string from Unicode character codes that are passed as arguments.
|
fromCharCode()
|
|
The ____ method converts a text string to lowercase.
|
toLowerCase()
|
|
The ____ method converts a text string to uppercase.
|
toUpperCase()
|
|
The ____ method of the String class returns the position number in a string of the first character in the argument.
|
indexOf()
|
|
The ____ method removes and returns the first element from the beginning of an array.
|
shift()
|
|
The ____ method returns the position number in a string of the first instance of the first character in the pattern argument.
|
search(pattern)
|
|
The ____ object contains methods and properties for working with regular expressions in JavaScript.
|
RegExp
|
|
To allow a string to contain an alternate set of substrings, you separate the strings in a regular expression pattern with the ____ metacharacter.
|
| OR
|
|
To convert a JavaScript object to a JSON string, you use the ____ method.
|
stringify()
|
|
To manipulate arrays in your scripts, you use the methods and length property of the ____ class.
|
Array
|
|
To sort elements of an array alphabetically, you use the ____ method.
|
sort()
|
|
You use the ____ method of the String class to split a string into an indexed array.
|
split()
|
|
You use ____ classes in regular expressions to treat multiple characters as a single item.
|
character
|