JavaScript Language | 10 Minute‐Test 20


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 is the storage that allows the caching of web pages and their associated resources?

A.
Web Databases
B.
FileSystem API
C.
Offline Web Applications
D.
All of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option C

Explanation:

HTML5 defines an “Offline Web Applications” API that allows the caching of web pages and their associated resources (scripts, CSS files, images, and so on). This is client-side storage for web applications themselves rather than just their data, and it allows web apps to install themselves so that they are available even when there is no connection to the Internet.

2.

When does JavaScript code appear inline within an HTML file?

A.
Between the “script” tag
B.
Outside the “script” tag
C.
Both a and b
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option A

Explanation:

JavaScript code can appear inline within an HTML file between the “script” tags.

3.

Which object is the main entry point to all client-side JavaScript features and APIs?

A.
Standard
B.
Location
C.
Window
D.
Position

Your Answer: Option (Not Answered)

Correct Answer: Option C

Explanation:

The Window object is the main entry point to all client-side JavaScript features and APIs. It represents a web browser window or frame, and you can refer to it with the identifier window.

4.

What are the properties supporting CSS styles for a document element?

A.
style and font
B.
style and className
C.
size and style
D.
className and font

Your Answer: Option (Not Answered)

Correct Answer: Option B

Explanation:

Each Element object has style and className properties that allow scripts to specify CSS styles for a document element or to alter the CSS class names that apply to the element.

5.

Which of the following is not a framework?

A.
jQuery
B.
.NET
C.
JavaScript
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option C

Explanation:

One of the most popular frameworks is jQuery. Here, JavaScript is a scripting language and not a framework.

6.

Which function among the following lets to register a function to be invoked repeatedly after a certain time?

A.
Timeoutset()
B.
setTotaltime()
C.
setInterval()
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option C

Explanation:

setTimeout() and setInterval() allow you to register a function to be invoked once or repeatedly after a specified amount of time has elapsed.

7.

What does the location property represent?

A.
Current DOM object
B.
Current URL
C.
Both a and b
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option B

Explanation:

The location property of a window is a reference to a Location object; it represents the current URL of the document being displayed in that window.

8.

If the window has child windows, how will the browsing histories be affected?

A.
Numerically interleaved
B.
Chronologically interleaved
C.
Both a and b
D.
None of the mentioned

Your Answer: Option (Not Answered)

Correct Answer: Option B

Explanation:

If a window contains child windows, the browsing histories of the child windows are chronologically interleaved with the history of the main window.

9.

Nested documents in the HTML can be done using

A.
frame
B.
nest
C.
iframe
D.
into

Your Answer: Option (Not Answered)

Correct Answer: Option C

Explanation:

HTML documents may contain nested documents using an iframe element. An iframe creates a nested browsing context represented by a Window object of its own.

10.

The paragraph “p” is a part of

A.
h1
B.
body
C.
html
D.
Both b and c
Submit your test now to view the Results and Statistics with answer explanation.