Filters
Question type

Study Flashcards

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

A) True
B) False

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) B) and D)
F) All of the above

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

If Patrice wants to reference the content of an object and wants her code to work for users if IE8, she will use the __________ property.


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

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

Correct Answer

verifed

verified

You specify a CSS selector in __________ within the parentheses of the querySelector() method to reference an object.


A) square brackets ( [ ] )
B) curly braces ( { } )
C) angle brackets ( )
D) quotes ( " " )

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

Correct Answer

verifed

verified

Name 3 ways that the punctuation for a function is similar to that of a CSS style rule.

Correct Answer

verifed

verified

1. An opening curly brace ( { ...

View Answer

The first line of a function begins with the word function , followed by its name and a pair of ____.


A) quotation marks
B) parentheses
C) equal signs
D) exclamation marks

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

Correct Answer

verifed

verified

  Referring to the figure above, which of the following is a function 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 function name used in the code shown?


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

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

Correct Answer

verifed

verified

The DOM defines ____, which are actions that are associated with an object.


A) modes
B) methods
C) events
D) activities

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

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 create code that responds to an event using a(n) __________.


A) variable
B) if statement
C) eventListener
D) property

E) All of the above
F) A) and B)

Correct Answer

verifed

verified

A function starts with the keyword __________.

Correct Answer

verifed

verified

The submit event takes place when a user clicks or touches an element.  _________________________

A) True
B) False

Correct Answer

verifed

verified

When creating a variable name that contains multiple words, it's common to use __________ case.

Correct Answer

verifed

verified

Explain the syntax of a statement that uses the assignment operator.

Correct Answer

verifed

verified

The code on the left side of the equal s...

View Answer

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) B) and C)
F) None of the above

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. In Alicia's JavaScript code, she can refer to a user moving the mouse pointer over an element with the __________ event.


A) load
B) mouseover
C) mouseout
D) submit

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

Correct Answer

verifed

verified

The punctuation for a function is similar to that of a CSS style rule: an opening ____ goes at the beginning.


A) curly brace ( { )
B) bracket ( [ )
C) quotation mark ( " )
D) pound sign ( # )

E) All of the above
F) C) and D)

Correct Answer

verifed

verified

Developers can write JavaScript that responds to actions, known as __________, which include many actions commonly performed on a web page.


A) methods
B) activities
C) events
D) statements

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

Correct Answer

verifed

verified

  Referring to the figure above, the code in this figure creates a(n)  __________. A)  function B)  if statement C)  variable D)  event listener Referring to the figure above, the code in this figure creates a(n) __________.


A) function
B) if statement
C) variable
D) event listener

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

Correct Answer

verifed

verified

  Referring to the figure above, what is the role of the line of code labeled with the number 1? A)  It creates an event listener. B)  It is a function. C)  It creates a variable. D)  It is a conditional statement. Referring to the figure above, what is the role of the line of code labeled with the number 1?


A) It creates an event listener.
B) It is a function.
C) It creates a variable.
D) It is a conditional statement.

E) B) and D)
F) All of the above

Correct Answer

verifed

verified

Showing 41 - 60 of 71

Related Exams

Show Answer