Pregunta 1
Pregunta
Which of the following will return a live HTML collection?
Respuesta
-
document.querySelector()
-
document.getElementByClassName()
-
document.getElementById()
-
document.querySelectorAll()
Pregunta 2
Pregunta
Which method would you use to stop a default action?
Pregunta 3
Pregunta
During a keydown event, altKey and ctrlKey will repeat if result of Boolean operator is true
Pregunta 4
Pregunta
The Array.from() method will not work in which of the following browsers
Respuesta
-
Internet Explorer
-
Google Chrome
-
Microsoft Edge
-
Mozilla Firefox
Pregunta 5
Pregunta
An HTML file can contain a reference for an external file. The…
Respuesta
-
Javascript
-
CSS
-
An image
-
All of the above
Pregunta 6
Pregunta
To add a class to an element without overwriting the other class…
Pregunta 7
Pregunta
What is the property on the event object for a click event…
Respuesta
-
clickedOn
-
event
-
click
-
rub
Pregunta 8
Pregunta
In order to reduce security problems, JavaScript runs in a restrictive environment called a:
Respuesta
-
firewall
-
sandbox
-
sean's house
-
tunnel
Pregunta 9
Pregunta
When adding event handler
Respuesta
-
add event listener
-
add event
-
event
-
event listener
Pregunta 10
Pregunta
Events are fired on the target element and then each of the target element’s parents.
Respuesta
-
propagation
-
targeting
-
capturing
-
observing
Pregunta 11
Pregunta
Leaf nodes can contain...
Respuesta
-
HTML nodes
-
HTML tags
-
text content
-
other elements
Pregunta 12
Pregunta
In order to use JavaScript on a web page, there must be a(n) _______ file.
Pregunta 13
Pregunta
When linking to JavaScript in a web page, the defer attribute will:
Respuesta
-
download the JavaScript file and run it right away
-
defer is not used with JavaScript
-
wait until the page is loaded and then download and run the JavaScript file
-
download the JavaScript file but run it after the page is loaded
Pregunta 14
Pregunta
How would you edit the background color of the element paragraph?
Respuesta
-
paragraph.style.backgroundcolor
-
paragraph.style.background-color
-
paragraph.backgroundcolor
-
paragraph.style.backgroundColor
Pregunta 15
Pregunta
Which of these is an event?
Respuesta
-
dblclick
-
click
-
keydown
-
All of the above
Pregunta 16
Pregunta
DOM stand for __________________
Respuesta
-
Document Object Model
-
Document Overall Method
-
Document variable
-
Document Observer Method
Pregunta 17
Pregunta
In order to reduce security problems, JavaScript runs in a restricted environment…
Pregunta 18
Pregunta 19
Pregunta
An event can be ________
Pregunta 20
Pregunta
Using querySelector(), the . symbol will select elements:
Respuesta
-
By the class
-
By the tag
-
By the name
-
By the ID
Pregunta 21
Pregunta
Using querySelector(), the # symbol will select elements:
Respuesta
-
By the class
-
By the tag
-
By the name
-
By the id
Pregunta 22
Pregunta
Which has the highest order of precedence?
Respuesta
-
Internal Stylesheets
-
the style property
-
Embedded Stylesheets
-
Inherited styles
Pregunta 23
Pregunta
The first thing the browser does when loading a webpage is:
Respuesta
-
size the HTML file to the screen
-
download the HTML file
-
load the JavaScript DOM functions to the page
-
open a model of the HTML file
Pregunta 24
Pregunta
What are the steps of a webpage being displayed?
Respuesta
-
a request is made when a link is clicked
-
the page and its resources are downloaded
-
javascript file downloaded and loaded by defer
Pregunta 25
Pregunta
event.repeat will return what type of value if a key is held?
Respuesta
-
Boolean
-
null
-
number
-
Array
Pregunta 26
Pregunta
Which command allows you to add text directly without first creating a text node?
Respuesta
-
el.textContent
-
el.appendChild()
-
el.CreateTextNode()
-
el.setAttribute()
Pregunta 27
Pregunta
In HTML, the type attribute is required in the <script> tag
Pregunta 28
Pregunta
You have added an event listen to the following code. Which of these will remove…
beta.addEventListener(‘click’, newgame);
Respuesta
-
newgame.removeEventListener(‘click’, alpha);
-
beta.removeEventListener();
-
beta.removeEventListener(‘click’, newgame);
-
removeEventListener(‘click’, newgame);
Pregunta 29
Pregunta
When using document.querySelectorAll() it returns:
Pregunta 30
Pregunta
A URL is used to:
Respuesta
-
download the closest match
-
get email
-
determine what program should download the file
-
uniquely identifies files on the Web
Pregunta 31
Pregunta
The second parameter of an addEventListener() accepts a ______________ variable.
Respuesta
-
event
-
array
-
list
-
function
Pregunta 32
Pregunta
The DOM is organized like a _____.
Pregunta 33
Pregunta
Like HTML, the default character-set for JavaScript is:
Respuesta
-
utf-8
-
emoji-23
-
defer
-
type
Pregunta 34
Pregunta
When a user releases a key, which event is sent?
Respuesta
-
keyup
-
shiftKey
-
space
-
keydown
Pregunta 35
Pregunta
If you have a <p> element stored in the variable para and you want to add text, which command should you use?
Respuesta
-
para.insert(txt)
-
para.addChild(txt)
-
paragraph.add(txt)
-
para.appendChild(txt)
Pregunta 36
Pregunta
To stop many events that may fire many times in a row, we can use stopPropagation()
Pregunta 37
Pregunta
You can use the function setTimeout() to schedule a function.
Pregunta 38
Pregunta
What is the global variable that contains the DOM?
Respuesta
-
head
-
window
-
body
-
document
Pregunta 39
Pregunta
What is the advantage of HTTPS over HTTP?
Respuesta
-
it is less expensive
-
it is encrypted
-
it is faster
-
all of the above
Pregunta 40
Pregunta
In order to use JavaScript on a webpage, you must include the _____.
Pregunta 41
Pregunta
Which event relates to the action of a keyboard being pressed?
Respuesta
-
keyclick
-
keypress
-
keyset
-
keybutton
Pregunta 42
Pregunta
The scroll event is fired every time the page is scrolled.