Tommy Phan
Quiz by , created more than 1 year ago

Good luck everyone!

23
0
0
No tags specified
Tommy Phan
Created by Tommy Phan over 5 years ago
Close

I Will Pass Quiz

Question 1 of 42

1

Which of the following will return a live HTML collection?

Select one of the following:

  • document.querySelector()

  • document.getElementByClassName()

  • document.getElementById()

  • document.querySelectorAll()

Explanation

Question 2 of 42

1

Which method would you use to stop a default action?

Select one of the following:

  • stopDefault()

  • preventDefault()

  • endDefault()

  • you can’t stop a default action

Explanation

Question 3 of 42

1

During a keydown event, altKey and ctrlKey will repeat if result of Boolean operator is true

Select one of the following:

  • True

  • False

Explanation

Question 4 of 42

1

The Array.from() method will not work in which of the following browsers

Select one of the following:

  • Internet Explorer

  • Google Chrome

  • Microsoft Edge

  • Mozilla Firefox

Explanation

Question 5 of 42

1

An HTML file can contain a reference for an external file. The…

Select one of the following:

  • Javascript

  • CSS

  • An image

  • All of the above

Explanation

Question 6 of 42

1

To add a class to an element without overwriting the other class…

Select one of the following:

  • element.classList.add()

  • element.className

  • element.classList.contains()

  • element.class

Explanation

Question 7 of 42

1

What is the property on the event object for a click event…

Select one of the following:

  • clickedOn

  • event

  • click

  • rub

Explanation

Question 8 of 42

1

In order to reduce security problems, JavaScript runs in a restrictive environment called a:

Select one of the following:

  • firewall

  • sandbox

  • sean's house

  • tunnel

Explanation

Question 9 of 42

1

When adding event handler

Select one of the following:

  • add event listener

  • add event

  • event

  • event listener

Explanation

Question 10 of 42

1

Events are fired on the target element and then each of the target element’s parents.

Select one of the following:

  • propagation

  • targeting

  • capturing

  • observing

Explanation

Question 11 of 42

1

Leaf nodes can contain...

Select one of the following:

  • HTML nodes

  • HTML tags

  • text content

  • other elements

Explanation

Question 12 of 42

1

In order to use JavaScript on a web page, there must be a(n) _______ file.

Select one of the following:

  • CSS

  • security

  • image

  • HTML

Explanation

Question 13 of 42

1

When linking to JavaScript in a web page, the defer attribute will:

Select one of the following:

  • 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

Explanation

Question 14 of 42

1

How would you edit the background color of the element paragraph?

Select one of the following:

  • paragraph.style.backgroundcolor

  • paragraph.style.background-color

  • paragraph.backgroundcolor

  • paragraph.style.backgroundColor

Explanation

Question 15 of 42

1

Which of these is an event?

Select one of the following:

  • dblclick

  • click

  • keydown

  • All of the above

Explanation

Question 16 of 42

1

DOM stand for __________________

Select one of the following:

  • Document Object Model

  • Document Overall Method

  • Document variable

  • Document Observer Method

Explanation

Question 17 of 42

1

In order to reduce security problems, JavaScript runs in a restricted environment…

Select one of the following:

  • True

  • False

Explanation

Question 18 of 42

1

Skip for now

Select one of the following:

  • skip

  • skip1

Explanation

Question 19 of 42

1

An event can be ________

Select one of the following:

  • never initiated by the user

  • an interaction with our page

  • a list of node child

  • none of the above

Explanation

Question 20 of 42

1

Using querySelector(), the . symbol will select elements:

Select one of the following:

  • By the class

  • By the tag

  • By the name

  • By the ID

Explanation

Question 21 of 42

1

Using querySelector(), the # symbol will select elements:

Select one of the following:

  • By the class

  • By the tag

  • By the name

  • By the id

Explanation

Question 22 of 42

1

Which has the highest order of precedence?

Select one of the following:

  • Internal Stylesheets

  • the style property

  • Embedded Stylesheets

  • Inherited styles

Explanation

Question 23 of 42

1

The first thing the browser does when loading a webpage is:

Select one of the following:

  • 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

Explanation

Question 24 of 42

1

What are the steps of a webpage being displayed?

Select one of the following:

  • a request is made when a link is clicked

  • the page and its resources are downloaded

  • javascript file downloaded and loaded by defer

Explanation

Question 25 of 42

1

event.repeat will return what type of value if a key is held?

Select one of the following:

  • Boolean

  • null

  • number

  • Array

Explanation

Question 26 of 42

1

Which command allows you to add text directly without first creating a text node?

Select one of the following:

  • el.textContent

  • el.appendChild()

  • el.CreateTextNode()

  • el.setAttribute()

Explanation

Question 27 of 42

1

In HTML, the type attribute is required in the <script> tag

Select one of the following:

  • True

  • False

Explanation

Question 28 of 42

1

You have added an event listen to the following code. Which of these will remove…

beta.addEventListener(‘click’, newgame);

Select one of the following:

  • newgame.removeEventListener(‘click’, alpha);

  • beta.removeEventListener();

  • beta.removeEventListener(‘click’, newgame);

  • removeEventListener(‘click’, newgame);

Explanation

Question 29 of 42

1

When using document.querySelectorAll() it returns:

Select one of the following:

  • A list

  • Individual objects for each element selected

  • An array like object

  • An array

Explanation

Question 30 of 42

1

A URL is used to:

Select one of the following:

  • download the closest match

  • get email

  • determine what program should download the file

  • uniquely identifies files on the Web

Explanation

Question 31 of 42

1

The second parameter of an addEventListener() accepts a ______________ variable.

Select one of the following:

  • event

  • array

  • list

  • function

Explanation

Question 32 of 42

1

The DOM is organized like a _____.

Select one of the following:

  • Circle

  • Block

  • Tree

  • Square

Explanation

Question 33 of 42

1

Like HTML, the default character-set for JavaScript is:

Select one of the following:

  • utf-8

  • emoji-23

  • defer

  • type

Explanation

Question 34 of 42

1

When a user releases a key, which event is sent?

Select one of the following:

  • keyup

  • shiftKey

  • space

  • keydown

Explanation

Question 35 of 42

1

If you have a <p> element stored in the variable para and you want to add text, which command should you use?

Select one of the following:

  • para.insert(txt)

  • para.addChild(txt)

  • paragraph.add(txt)

  • para.appendChild(txt)

Explanation

Question 36 of 42

1

To stop many events that may fire many times in a row, we can use stopPropagation()

Select one of the following:

  • True

  • False

Explanation

Question 37 of 42

1

You can use the function setTimeout() to schedule a function.

Select one of the following:

  • True

  • False

Explanation

Question 38 of 42

1

What is the global variable that contains the DOM?

Select one of the following:

  • head

  • window

  • body

  • document

Explanation

Question 39 of 42

1

What is the advantage of HTTPS over HTTP?

Select one of the following:

  • it is less expensive

  • it is encrypted

  • it is faster

  • all of the above

Explanation

Question 40 of 42

1

In order to use JavaScript on a webpage, you must include the _____.

Select one of the following:

  • src

  • script

  • js

  • link

Explanation

Question 41 of 42

1

Which event relates to the action of a keyboard being pressed?

Select one of the following:

  • keyclick

  • keypress

  • keyset

  • keybutton

Explanation

Question 42 of 42

1

The scroll event is fired every time the page is scrolled.

Select one of the following:

  • True

  • False

Explanation