Quiz
I Will Pass Quiz
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (42)
1Which of the following will return a live HTML collection?
- Adocument.querySelector()
- Bdocument.getElementByClassName()
- Cdocument.getElementById()
- Ddocument.querySelectorAll()
2Which method would you use to stop a default action?
- AstopDefault()
- BpreventDefault()
- CendDefault()
- Dyou can’t stop a default action
3During a keydown event, altKey and ctrlKey will repeat if result of Boolean operator is true
- ATrue
- BFalse
4The Array.from() method will not work in which of the following browsers
- AInternet Explorer
- BGoogle Chrome
- CMicrosoft Edge
- DMozilla Firefox
5An HTML file can contain a reference for an external file. The…
- AJavascript
- BCSS
- CAn image
- DAll of the above
6To add a class to an element without overwriting the other class…
- Aelement.classList.add()
- Belement.className
- Celement.classList.contains()
- Delement.class
7What is the property on the event object for a click event…
- AclickedOn
- Bevent
- Cclick
- Drub
8In order to reduce security problems, JavaScript runs in a restrictive environment called a:
- Afirewall
- Bsandbox
- Csean's house
- Dtunnel
9When adding event handler
- Aadd event listener
- Badd event
- Cevent
- Devent listener
10Events are fired on the target element and then each of the target element’s parents.
- Apropagation
- Btargeting
- Ccapturing
- Dobserving
11Leaf nodes can contain...
- AHTML nodes
- BHTML tags
- Ctext content
- Dother elements
12In order to use JavaScript on a web page, there must be a(n) _______ file.
- ACSS
- Bsecurity
- Cimage
- DHTML
13When linking to JavaScript in a web page, the defer attribute will:
- Adownload the JavaScript file and run it right away
- Bdefer is not used with JavaScript
- Cwait until the page is loaded and then download and run the JavaScript file
- Ddownload the JavaScript file but run it after the page is loaded
14How would you edit the background color of the element paragraph?
- Aparagraph.style.backgroundcolor
- Bparagraph.style.background-color
- Cparagraph.backgroundcolor
- Dparagraph.style.backgroundColor
15Which of these is an event?
- Adblclick
- Bclick
- Ckeydown
- DAll of the above
16DOM stand for __________________
- ADocument Object Model
- BDocument Overall Method
- CDocument variable
- DDocument Observer Method
17In order to reduce security problems, JavaScript runs in a restricted environment…
- ATrue
- BFalse
18Skip for now
- Askip
- Bskip1
19An event can be ________
- Anever initiated by the user
- Ban interaction with our page
- Ca list of node child
- Dnone of the above
20Using querySelector(), the . symbol will select elements:
- ABy the class
- BBy the tag
- CBy the name
- DBy the ID
21Using querySelector(), the # symbol will select elements:
- ABy the class
- BBy the tag
- CBy the name
- DBy the id
22Which has the highest order of precedence?
- AInternal Stylesheets
- Bthe style property
- CEmbedded Stylesheets
- DInherited styles
23The first thing the browser does when loading a webpage is:
- Asize the HTML file to the screen
- Bdownload the HTML file
- Cload the JavaScript DOM functions to the page
- Dopen a model of the HTML file
24What are the steps of a webpage being displayed?
- Aa request is made when a link is clicked
- Bthe page and its resources are downloaded
- Cjavascript file downloaded and loaded by defer
25event.repeat will return what type of value if a key is held?
- ABoolean
- Bnull
- Cnumber
- DArray
26Which command allows you to add text directly without first creating a text node?
- Ael.textContent
- Bel.appendChild()
- Cel.CreateTextNode()
- Del.setAttribute()
27In HTML, the type attribute is required in the <script> tag
- ATrue
- BFalse
28You have added an event listen to the following code. Which of these will remove…
beta.addEventListener(‘click’, newgame);- Anewgame.removeEventListener(‘click’, alpha);
- Bbeta.removeEventListener();
- Cbeta.removeEventListener(‘click’, newgame);
- DremoveEventListener(‘click’, newgame);
29When using document.querySelectorAll() it returns:
- AA list
- BIndividual objects for each element selected
- CAn array like object
- DAn array
30A URL is used to:
- Adownload the closest match
- Bget email
- Cdetermine what program should download the file
- Duniquely identifies files on the Web
31The second parameter of an addEventListener() accepts a ______________ variable.
- Aevent
- Barray
- Clist
- Dfunction
32The DOM is organized like a _____.
- ACircle
- BBlock
- CTree
- DSquare
33Like HTML, the default character-set for JavaScript is:
- Autf-8
- Bemoji-23
- Cdefer
- Dtype
34When a user releases a key, which event is sent?
- Akeyup
- BshiftKey
- Cspace
- Dkeydown
35If you have a <p> element stored in the variable para and you want to add text, which command should you use?
- Apara.insert(txt)
- Bpara.addChild(txt)
- Cparagraph.add(txt)
- Dpara.appendChild(txt)
36To stop many events that may fire many times in a row, we can use stopPropagation()
- ATrue
- BFalse
37You can use the function setTimeout() to schedule a function.
- ATrue
- BFalse
38What is the global variable that contains the DOM?
- Ahead
- Bwindow
- Cbody
- Ddocument
39What is the advantage of HTTPS over HTTP?
- Ait is less expensive
- Bit is encrypted
- Cit is faster
- Dall of the above
40In order to use JavaScript on a webpage, you must include the _____.
- Asrc
- Bscript
- Cjs
- Dlink
41Which event relates to the action of a keyboard being pressed?
- Akeyclick
- Bkeypress
- Ckeyset
- Dkeybutton
42The scroll event is fired every time the page is scrolled.
- ATrue
- BFalse
Information
- Description
- Good luck everyone!
- Author
- Tommy Phan
- Language
- English
- Views
- 28
- Rating
- No ratings yet Rate this quiz