Explore topic-wise MCQs in Javascript.

This section includes 302 Mcqs, each offering curated multiple-choice questions to sharpen your Javascript knowledge and support exam preparation. Choose a topic below to get started.

51.

Which symbol is used to start a comment?

A. /
B. $
C. #
D. None of the mentioned
Answer» D. None of the mentioned
52.

Which of the following is a loosely-typed language?

A. R
B. T
C. S
D. Both R and S
Answer» D. Both R and S
53.

What is the usage of the keyword ?? in R?

A. Help window
B. Extensive search
C. Error correction
D. Error detection
Answer» C. Error correction
54.

Which is the keyword used to open the Help window?

A. ()
B. #
C. ?
D. =
Answer» D. =
55.

For a more extensive search, which keyword needs to be used?

A. ??
B. ?
C. ?=
D.
Answer» B. ?
56.

What kind of data can be run in R?

A. Binary
B. Text
C. Decimals
D. All kinds
Answer» E.
57.

What does the R language do?

A. Tighten and format the chart
B. Ingest and process the chart
C. Format and Ingest the chart
D. None of the mentioned
Answer» C. Format and Ingest the chart
58.

Why do we use Adobe Illustrator along with R?

A. Collect the relevant data
B. Format the chart and to correct the errors
C. Tighten and format the chart
D. Ingest and process the chart
Answer» D. Ingest and process the chart
59.

Java Script Variable should be Case ___________.

A. Non Sensitive
B. Sensitive
C. Both A and B
D. None of the above
Answer» C. Both A and B
60.

Multiple Declarations of variables are separated by ___________ symbol.

A. Comma
B. Semicolon
C. Asterisk
D. Colon
Answer» B. Semicolon
61.

We can declare ___________ at a time. Select most appropriate option.

A. One or more Variables
B. More than One Variables
C. One Variable Only
D. None of these
Answer» B. More than One Variables
62.

Spaces,Punctuation marks are called as __________ Symbols in JavaScript.

A. Punctual
B. None of these
C. Mandetory
D. Special
Answer» E.
63.

Integer Variable is declared using following syntax in JavaScript.

A. int num;
B. Integer num;
C. integer num;
D. var num;
Answer» E.
64.

Variable can hold ________ value at a time.

A. Multiple
B. Single
C. None of these
D. Double
Answer» C. None of these
65.

JavaScript was invented at _______ Lab.

A. AT&T Bell LAb
B. Google Lab
C. Sun Microsystem
D. Netscape
Answer» E.
66.

Which was the first browser to support JavaScript ?

A. IE
B. Netscape
C. Mozilla Firefox
D. Google Chrome
Answer» C. Mozilla Firefox
67.

JavaScript Code can be called by using _________.

A. RMI
B. Triggering Event
C. Preprocessor
D. Function / Method
Answer» E.
68.

The basic purpose of the toLocaleString() is to

A. return a localised object representation
B. return a parsed string
C. return a local time in the string format
D. return a localized string representation of the object
Answer» E.
69.

Consider the following code snippet function f() {}; The above prototype represents a

A. Function f
B. A custom constructor
C. Prototype of a function
D. Not valid
Answer» C. Prototype of a function
70.

A linkage of series of prototype objects is called as

A. prototype stack
B. prototype chain
C. prototype class
D. prototypes
Answer» C. prototype class
71.

Among the keywords below, which one is not a statement?

A. debugger
B. with
C. if
D. use strict
Answer» E.
72.

Consider the following code snippet function f(o) { if (o === undefined) debugger; } What could be the task of the statement debugger?

A. It does nothing but a simple breakpoint
B. It debugs the error in that statement and restarts the statement’s execution
C. It is used as a keyword that debugs the entire program at once
D. All of the mentioned
Answer» B. It debugs the error in that statement and restarts the statement’s execution
73.

JavaScript can be written

A. directly into JS file and included into HTML
B. directly on the server page
C. directly into HTML pages
D. All of the mentioned
Answer» B. directly on the server page
74.

JavaScript is ideal to

A. make computations in HTML simpler
B. minimize storage requirements on the web server
C. increase the download time for the client
D. None of the mentioned
Answer» C. increase the download time for the client
75.

A JavaScript program developed on a Unix Machine

A. will throw errors and exceptions
B. must be restricted to a Unix Machine only
C. will work perfectly well on a Windows Machine
D. will be displayed as a JavaScript text on the browser
Answer» D. will be displayed as a JavaScript text on the browser
76.

The script tag must be placed in

A. head
B. head and body
C. title and head
D. All of the mentioned
Answer» C. title and head
77.

Arrange the TCP/IP model layers in the order from furthest to closest to the end user.

A. Network Access Layer, Internet Layer, Application Layer, Transport Layer
B. Network Access Layer, Transport Layer, Internet Layer, Application Layer
C. Network Access Layer, Internet Layer, Transport Layer, Application Layer
D. Network Access Layer, Application Layer, Internet Layer, Transport Layer
Answer» D. Network Access Layer, Application Layer, Internet Layer, Transport Layer
78.

What are the various possessions in the three-way handshake by the TCP?

A. Synchronize
B. Synchronize-Acknowledge
C. Acknowledge message
D. All of the mentioned
Answer» E.
79.

Which layer handles the top-level communication?

A. Network Access Layer
B. Internet Layer
C. Transport Layer
D. Application Layer
Answer» E.
80.

Once the TCP/IP connection has been established, the browser sends an HTTP GET request over the connection to the remote server. The remote server finds the resource and returns it in an HTTP Response, the status of which is 200 to indicate a good response.

A. HTTP Response
B. HTTP Request
C. Get Request
D. None of the mentioned
Answer» B. HTTP Request
81.

How will the HTTP GET request be sent from the browser?

A. Remote server
B. Local server
C. By itself
D. None of the mentioned
Answer» D. None of the mentioned
82.

Which is the alternate name for JavaScriptCore that is used by Safari?

A. Nitro
B. SpiderMoney
C. Carakan
D. None of the mentioned
Answer» B. SpiderMoney
83.

SpiderMonkey was developed by

A. Firefox
B. Internet Explorer
C. Safari
D. Opera
Answer» B. Internet Explorer
84.

Which of the following is a property used to check how crisp or fuzzy shadows are?

A. shadowColor
B. shadowBlur
C. strokeStyle
D. none of the mentioned
Answer» C. strokeStyle
85.

How do you restore a saved coordinate system?

A. restore()
B. getback()
C. set()
D. none of the mentioned
Answer» B. getback()
86.

Which method is used to obtain the “drawing context” object ?

A. getContext()
B. getObject()
C. get()
D. getDrawing()
Answer» B. getObject()
87.

Which of the following is the parameter used to invoke the Audio() constructor?

A. File type
B. Music type
C. Both File and Music
D. None of the mentioned
Answer» D. None of the mentioned
88.

Which of the following is not the property of the video tag?

A. width
B. height
C. breadth
D. none of the mentioned
Answer» D. none of the mentioned
89.

Which of the following attributes are common to both audio and video?

A. enter
B. control
C. controls
D. all of the mentioned
Answer» D. all of the mentioned
90.

When is JavaScript called obtrusive?

A. JavaScript code is medium sized
B. JavaScript code is so small
C. JavaScript code is so large
D. All of the mentioned
Answer» D. All of the mentioned
91.

Which HTML element is used to include images?

A. image
B. img
C. src
D. sourceing
Answer» C. src
92.

Which of the following are the parameters passed to the keymap after installation?

A. Key property
B. Key name
C. Keydown event’s object
D. Key stroke
Answer» D. Key stroke
93.

Which method is used to remove a binding?

A. Unbind()
B. removebind()
C. remove(Bind b)
D. unbind()
Answer» E.
94.

What value does the keyCode property holds when a Shift key is pressed for adding punctuation character?

A. Special characters
B. Alphabets
C. Alphanumeric
D. Digits
Answer» E.
95.

Which API allows scripts in a document from one server to exchange messages with scripts?

A. Cross-Document Messaging API
B. Web application API
C. Both Cross-Document Messaging API & Web application API
D. None of the mentioned
Answer» B. Web application API
96.

Which property holds a DataTransfer object that contains information about the data being transferred and the formats in whichh it is available?

A. dataTransfer
B. transferData
C. dataExchange
D. exchangeData
Answer» B. transferData
97.

Which property reports rotation around three different mouse wheel axes?

A. ctrlKey
B. alterX
C. alterY
D. deltaX
Answer» E.
98.

Which event is triggered sooner when the document and its elements are ready to manipulate?

A. DOMContentLoaded
B. readystatechange
C. Both DOMContentLoaded & readystatechange
D. None of the mentioned
Answer» D. None of the mentioned
99.

The events that is emulated by the jQuery library are

A. focusarea and focusover
B. focusall and focusnone
C. focusdown and focusup
D. focusin and focusout
Answer» C. focusdown and focusup
100.

The element that can also register handlers for load and error events is

A. html
B. img
C. body
D. form
Answer» C. body