Filters
Question type

Study Flashcards

Case-Based Critical Thinking Question Patrice is creating JavaScript code for her website. Her first task is to reference several HTML elements. -Patrice can reference HTML elements in JavaScript using the __________ method.


A) selectElement
B) selectId
C) querySelector
D) addEventListener

E) A) and D)
F) B) and C)

Correct Answer

verifed

verified

Using comparison operators, you can create a(n) __________ statement, in which two values are compared and if the result is true, one or more statements are executed.


A) if
B) compare
C) which
D) for

E) A) and D)
F) C) and D)

Correct Answer

verifed

verified

The querySelector() method is a child of the __________ object.

Correct Answer

verifed

verified

The __________ object is the parent element of the DOM tree.


A) Document
B) Element
C) Head
D) Body

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

Each item in the DOM tree--including elements, attributes, and text content--is known as a(n) __________.

Correct Answer

verifed

verified

Whenever you use a method, you specify its parent object first, followed by a space and then the method name.

A) True
B) False

Correct Answer

verifed

verified

Matching Match each commonly used JavaScript property with the appropriate description. -the text content of an object, excluding any nested HTML tags


A) classValue
B) innerHTML
C) src
D) textContent
E) Value

F) C) and D)
G) B) and D)

Correct Answer

verifed

verified

  -Referring to the figure above, which of the following is a variable name used in the code shown? A)  greetingText B)  addGreeting C)  Good Morning! D)  function -Referring to the figure above, which of the following is a variable name used in the code shown?


A) greetingText
B) addGreeting
C) Good Morning!
D) function

E) A) and C)
F) A) and B)

Correct Answer

verifed

verified

Every JavaScript statement ends with a(n) __________.


A) colon ( : )
B) period ( . )
C) semicolon ( ; )
D) comma ( , )

E) B) and C)
F) A) and B)

Correct Answer

verifed

verified

To call a function in response to a user action, a developer creates a(n) object listener._________________________

A) True
B) False

Correct Answer

verifed

verified

Case-Based Critical Thinking Question Alicia wants to increase the sizes of images on her website in response to users moving the mouse pointer over them. To add this feature, she plans to use JavaScript. -Alicia can change the CSS styles of the image with the mouse pointer over it by changing the element's __________ property with JavaScript to add or remove class values from the element.


A) elementName
B) className
C) value
D) textContent

E) B) and D)
F) B) and C)

Correct Answer

verifed

verified

A common method for changing an element's CSS styles in response to a user's actions is to add or remove ID values from the element in response to events._________________________

A) True
B) False

Correct Answer

verifed

verified

The __________, which is part of the developer tools in a modern web browser, can be used to enter test code and view error message related to JavaScript.


A) address bar
B) bookmarks list
C) console
D) emulator

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

The value property refers to the current value of a form field or an object property.

A) True
B) False

Correct Answer

verifed

verified

True

What kind of information can you store in a variable? How are variables useful when creating object references, and why?

Correct Answer

verifed

verified

What kind of information can you store i...

View Answer

A(n) property is a JavaScript instruction that performs an action._________________________

A) True
B) False

Correct Answer

verifed

verified

False

​ ​ ​ ​    -Referring to the figure above, the word addEventListener is an example of a(n)  __________. A)  property B)  variable C)  method D)  value -Referring to the figure above, the word addEventListener is an example of a(n) __________.


A) property
B) variable
C) method
D) value

E) A) and C)
F) A) and B)

Correct Answer

verifed

verified

The assignment operator is simply a question mark (?).

A) True
B) False

Correct Answer

verifed

verified

The addEventListener method is commonly used to access the element specified by a CSS selector.

A) True
B) False

Correct Answer

verifed

verified

False

​ ​    -Referring to the figure above, the code addressState.textContent ===  CO  is a(n)  __________. A)  variable B)  function C)  expression D)  event listener -Referring to the figure above, the code addressState.textContent === "CO" is a(n) __________.


A) variable
B) function
C) expression
D) event listener

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

Showing 1 - 20 of 75

Related Exams

Show Answer