JavaScript Language | 10 Minute‐Test 22


Instruction

  • Total number of questions : 10.
  • Time alloted : 10 minutes.
  • Each question carry 1 mark.
  • No Negative marks
  • DO NOT refresh the page.
  • All the best :-).

1.

Which object supports Filesystem API?

A.
Element
B.
File
C.
Window
D.
DOM

Your Answer: Option (Not Answered)

Correct Answer: Option B

Explanation:

The File object allows user-selected files to be uploaded through an XMLHttpRequest.

2.

Which is the root element in a HTML document?

A.
HTML
B.
HEAD
C.
SCRIPT
D.
BODY

Your Answer: Option (Not Answered)

Correct Answer: Option A

Explanation:

The "html" tag is the root element of any HTML document regardless of it containing a JavaScript code or not.

3.

Which property in the Window object is used to refer to a Location object?

A.
position
B.
area
C.
window
D.
location

Your Answer: Option (Not Answered)

Correct Answer: Option D

Explanation:

The Window object defines properties like location, which refers to a Location object that specifies the URL currently displayed in the window and allows a script to load a new URL into the window.

4.

What is the purpose of the event handlers in the JavaScript?

A.
Adds innerHTML page to the code
B.
Performs handling of exceptions and occurences
C.
Allows JavaScript code to alter the behaviour of windows
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option C

Explanation:

Event handlers allow JavaScript code to alter the behavior of windows, of documents, and of the elements that make up those documents.

5.

What is the purpose of Dojo framework?

A.
Focuses on DOM and Ajax utilities
B.
Advertises incredible depth
C.
Both a and b
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option B

Explanation:

Dojo is a large framework that advertises its “incredible depth.” It includes an extensive set of UI widgets, a package system, a data abstraction layer, and more.

6.

Which property is used to obtain browser vendor and version information?

A.
modal
B.
version
C.
browser
D.
navigator

Your Answer: Option (Not Answered)

Correct Answer: Option D

Explanation:

The navigator property is used to obtain browser vendor and version information.

7.

What is the return type of the hash property?

A.
Query string
B.
Packets
C.
String
D.
Fragment identifier

Your Answer: Option (Not Answered)

Correct Answer: Option D

Explanation:

The hash property returns the “fragment identifier” portion of the URL, if there is one: a hash mark (#) followed by an element ID.

8.

What is the datatype of the go() method’s parameter?

A.
String
B.
Integer
C.
Double
D.
Float

Your Answer: Option (Not Answered)

Correct Answer: Option B

Explanation:

The go() method takes an integer argument and can skip any number of pages forward and backward in the history list.

9.

What is the distinction made by JavaScript between windows, tabs, iframes, and frames ?

A.
They are all browsing contexts
B.
They are all browsing informations
C.
They are all Window contexts
D.
They are all Window objects

Your Answer: Option (Not Answered)

Correct Answer: Option D

Explanation:

Client-side JavaScript makes very little distinction between windows, tabs, iframes, and frames: they are all browsing contexts, and to JavaScript, they are all Window objects.

10.

The Text and Comment is part of

A.
CharacterData
B.
Document
C.
Attr
D.
Element
Submit your test now to view the Results and Statistics with answer explanation.