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