ISYS 115 - Programming Logic and
Design Exam Cards Questions and
Answers
Which of the following uses the correct case? - ANSWER-document. write()
Which method displays a dialog box with an OK button? - ANSWER-window. alert()
When you assign a specific value to a variable on its creation, you __________ it. -
ANSWER-initialize
Which of the following is not a JavaScript keyword used to declare a variable? -
ANSWER-variable
What is usually the primary role of a client - ANSWER-the presentation of an
interface to the user
JavaScript is built upon: - ANSWER-ECMAScript
The Document Object Model
The Browser Object Model
The syntax specifications for JavaScript are defined in: - ANSWER-ECMAScript
The specifications for the Document Object Model are determined by: - ANSWER-
the World Wide Web Consortium (W3C)
Which of the following can be used as part of a for loop to go through all the
elements in the xValues array? - ANSWER-for (let i = 0; i < xValues. length; i++)
To reference the third inline image found within the web page document, use the
following: - ANSWER-document. images[2]
Posttest loops are _______. - ANSWER-program loops in which the stopping
condition is evaluated after the command block has been executed at least once
A simple if/else statement enables you to specify code for __________ alternatives?
- ANSWER-two
To create a multidimensional array in JavaScript, you must________. - ANSWER-
nest one array within another
The forEach() method________. - ANSWER-is used to apply a function to every
element within an array without using a program loop
, To access HTML elements by the value of their class attribute, which of the following
would you use? - ANSWER-document.getElementsByClassName()
To reference the element in the third row and fourth column of the multidimensional
array xValues, use the following expression: - ANSWER-xValues[2][3]
Which of the following properties returns the number of elements in an array? -
ANSWER-Length
In an if else statement, the else command block will be run when _______. -
ANSWER-the conditional expression is falsy
If you do not include code that changes the counter value in a loop statement, your
program will be caught in a(n) __________ . - ANSWER-infinite loop
To insert HTML code within an element without overwriting code already in that
element, use the ________ method - ANSWER-insertAdjacentHTML()
Which of the following statements adds the value "oak" as the third element of the
trees array? - ANSWER-trees[2] = "oak";
Each repetition of a program loop is called a(n) ________.: - ANSWER-Iteration
Which command executes all the statements in the next function in browser
debugging tools? - ANSWER-Step Over
______ errors are problems in the design of a program that prevent it from running
as you anticipate. - ANSWER-Logic
Which of the following for statements is logically incorrect? - ANSWER-for (var count
= 10; count <= 0; count++) {
document.write(count);
}
Which of the following modes temporarily suspends, or pauses, program execution
so that you can monitor values and trace program execution? - ANSWER-Break
After you throw an exception, you use a ______ statement to handle the error. -
ANSWER-catch
Which of the following pieces of information is passed as an argument from a throw
statement to a catch statement - ANSWER-Error Message
Which of the following statements writes the value of the selection variable to the
console? - ANSWER-console.log(selection);
Which of the following statements causes a syntax error? - ANSWER-
document.write(Available points: " + availPoints);
Design Exam Cards Questions and
Answers
Which of the following uses the correct case? - ANSWER-document. write()
Which method displays a dialog box with an OK button? - ANSWER-window. alert()
When you assign a specific value to a variable on its creation, you __________ it. -
ANSWER-initialize
Which of the following is not a JavaScript keyword used to declare a variable? -
ANSWER-variable
What is usually the primary role of a client - ANSWER-the presentation of an
interface to the user
JavaScript is built upon: - ANSWER-ECMAScript
The Document Object Model
The Browser Object Model
The syntax specifications for JavaScript are defined in: - ANSWER-ECMAScript
The specifications for the Document Object Model are determined by: - ANSWER-
the World Wide Web Consortium (W3C)
Which of the following can be used as part of a for loop to go through all the
elements in the xValues array? - ANSWER-for (let i = 0; i < xValues. length; i++)
To reference the third inline image found within the web page document, use the
following: - ANSWER-document. images[2]
Posttest loops are _______. - ANSWER-program loops in which the stopping
condition is evaluated after the command block has been executed at least once
A simple if/else statement enables you to specify code for __________ alternatives?
- ANSWER-two
To create a multidimensional array in JavaScript, you must________. - ANSWER-
nest one array within another
The forEach() method________. - ANSWER-is used to apply a function to every
element within an array without using a program loop
, To access HTML elements by the value of their class attribute, which of the following
would you use? - ANSWER-document.getElementsByClassName()
To reference the element in the third row and fourth column of the multidimensional
array xValues, use the following expression: - ANSWER-xValues[2][3]
Which of the following properties returns the number of elements in an array? -
ANSWER-Length
In an if else statement, the else command block will be run when _______. -
ANSWER-the conditional expression is falsy
If you do not include code that changes the counter value in a loop statement, your
program will be caught in a(n) __________ . - ANSWER-infinite loop
To insert HTML code within an element without overwriting code already in that
element, use the ________ method - ANSWER-insertAdjacentHTML()
Which of the following statements adds the value "oak" as the third element of the
trees array? - ANSWER-trees[2] = "oak";
Each repetition of a program loop is called a(n) ________.: - ANSWER-Iteration
Which command executes all the statements in the next function in browser
debugging tools? - ANSWER-Step Over
______ errors are problems in the design of a program that prevent it from running
as you anticipate. - ANSWER-Logic
Which of the following for statements is logically incorrect? - ANSWER-for (var count
= 10; count <= 0; count++) {
document.write(count);
}
Which of the following modes temporarily suspends, or pauses, program execution
so that you can monitor values and trace program execution? - ANSWER-Break
After you throw an exception, you use a ______ statement to handle the error. -
ANSWER-catch
Which of the following pieces of information is passed as an argument from a throw
statement to a catch statement - ANSWER-Error Message
Which of the following statements writes the value of the selection variable to the
console? - ANSWER-console.log(selection);
Which of the following statements causes a syntax error? - ANSWER-
document.write(Available points: " + availPoints);