98
73.8k
Chapter:

60+ JavaScript Solved MCQs

in Web Technology

These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Bachelor of Computer Applications (BCA) , Bachelor of Business Administration in Computer Applications (BBA [CA]) .

Chapters

Chapter: JavaScript
1.

-----is a high-level scripting language that is synchronous with client-side
scripting

A. java script
B. php
C. oracle
D. none of these
Answer» A. java script
2.

----- a versatile language of the front-end that is mainly used to make web
pages interactive and dynamic

A. java script
B. php
C. oracle
D. none of these
Answer» A. java script
3.

-------was originally developed to perform client-side functions

A. java script
B. php
C. oracle
D. none of these
Answer» A. java script
4.

--- a versatile programming language which is specially designed to build
interactive web interfaces to make websites look really good.

A. java script
B. php
C. oracle
D. none of these
Answer» A. java script
5.

----one of the most powerful programming languages used to create
interactive effects within web browsers without interacting with the server side

A. java script
B. php
C. oracle
D. none of these
Answer» A. java script
6.

-----is specifically designed to build interactive web interfaces and create
network-specific applications without interacting with the server side

A. java script
B. php
C. oracle
D. none of these
Answer» A. java script
7.

------is the scripting language designed primarily for adding interactively to web
pages and creating web applications

A. java script
B. php
C. oracle
D. none of these
Answer» A. java script
8.

A -----scripting is a light weight programming language

A. java script
B. php
C. oracle
D. none of these
Answer» A. java script
9.

------is very fast because it can be run immediately within the client-side browser

A. java script
B. php
C. oracle
D. none of these
Answer» A. java script
10.

------is relatively simple to learn and implement.

A. java script
B. php
C. oracle
D. none of these
Answer» A. java script
11.

Client side------does not allow the reading and writing of files.

A. java script
B. php
C. oracle
D. none of these
Answer» A. java script
12.

In HTML, JavaScript code is inserted betweent-----and </script> tags

A. script
B. VER
C. TITLE
D. none of these
Answer» A. script
13.

To access an HTML element, JavaScript can use the------method.

A. document.getElementById(id
B. CONSOLE
C. COUT
D. none of these
Answer» A. document.getElementById(id
14.

--------Is used to show the out put or give message

A. document.write():
B. printf
C. COUT
D. none of these
Answer» A. document.write():
15.

For debugging purposes, you can call the ----method in the browser to display
data.

A. document.write():
B. CONSOLE.LOG()
C. COUT()
D. none of these
Answer» B. CONSOLE.LOG()
16.

----this key word is used to declared the variable in java script.

A. document.write():
B. CONSOLE.LOG
C. var
D. none of these
Answer» C. var
17.

-----this key word is used to declared the constant in java script.

A. document.write():
B. CONST
C. var
D. none of these
Answer» B. CONST
18.

-------it is assignment operator is used to assign value from right hand side to left
hand side .

A. document.write():
B. CONST
C. =
D. none of these
Answer» C. =
19.

------it is assignment operator is used to not equal value.

A. document.write():
B. CONST
C. =
D. !==
Answer» D. !==
20.

in java script------are written with quotes. You can use single or double quotes.

A. document.write():
B. STRING
C. =
D. !==
Answer» B. STRING
21.

in java script------items are separated by commas.

A. document.write():
B. STRING
C. array
D. !==
Answer» C. array
22.

Which type of JavaScript language is ___

A. Object-Oriented
B. Object-Based
C. Assembly-language
D. High-level
Answer» B. Object-Based
23.

Which one of the following also known as Conditional Expression:

A. Alternative to if-else
B. Switch statement
C. If-then-else statement
D. immediate if
Answer» C. If-then-else statement
24.

The "function" and " var" are known as

A. Keywords
B. Data types
C. Declaration statements
D. Prototypes
Answer» C. Declaration statements
25.

Which of the following variables takes precedence over the others if the names
are the same?

A. Global variable
B. The local element
C. The two of the above
D. None of the above
Answer» B. The local element
26.

Which one of the following is the correct way for calling the JavaScript code?

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

Which of the following type of a variable is volatile?

A. Mutable variable
B. Dynamic variable
C. Volatile variable
D. Immutable variable
Answer» A. Mutable variable
28.

the JavaScript, which one of the following is not considered as an error:

A. Syntax error
B. Missing of semicolons
C. Division by zero
D. Missing of Bracket
Answer» C. Division by zero
29.

In JavaScript the x===y statement implies that:

A. Both x and y are equal in value, address as well.
B. Both are x and y are equal in value only.
C. Both are equal in the value and data type.
D. Both are not same at all.
Answer» C. Both are equal in the value and data type.
30.

In JavaScript, what will be used for calling the function definition expression:

A. Function prototype
B. Function literal
C. Function calling
D. Function declaration
Answer» B. Function literal
31.

Which one of the following is an ternary operator:

A. ?
B. :
C. -
D. +
Answer» A. ?
32.

Which one of the following is known as the Equality operator, which is used to
check whether the two values are equal or not:

A. =
B. ===
C. ==
D. &&
Answer» C. ==
33.

Which one of the following symbol is used for creating comments in the
javascript:

A. \\
B. //
C. \* *\
D. \* */
Answer» B. //
34.

Which one of the following is not considered as "statement" in the JavaScript?

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

A collection of elements of the same data type which may either in order or not,
is called _____.

A. String
B. Array
C. Serialized Object
D. Object
Answer» B. Array
36.

Is JavaScript a case-sensitive language?

A. true
B. false
C. can not say
D. none of these
Answer» A. true
37.

JavaScript is ______ Side scripting language.

A. Server
B. Client
C. ISP
D. Browser
Answer» D. Browser
38.

. The behaviour of the document elements can be defined by

A. Using document object
B. Registering appropriate event handlers
C. Using element object
D. All of the mentioned
Answer» B. Registering appropriate event handlers
39.

The service(s) that enables networking through scripted HTTP requests is

A. XMLHttpResponse
B. XMLRequest
C. XMLHttpRequest
D. All of the mentioned
Answer» C. XMLHttpRequest
40.

The HTML5 specification includes

A. Data storage
B. Graphics APIs
C. Other APIs for web apps
D. All of the mentioned
Answer» D. All of the mentioned
41.

Which of the following are not advanced services?

A. Data storage
B. Networking
C. XMLHttpRequest object
D. None of the mentioned
Answer» D. None of the mentioned
42.

JavaScript code between a pair of “script” tags are called

A. Non-inline
B. External
C. Referenced
D. Inline
Answer» D. Inline
43.

Client-side JavaScript code is embedded within HTML documents in

A. A URL that uses the special javascript:encoding
B. A URL that uses the special javascript:stack
C. A URL that uses the special javascript:protocol
D. A URL that uses the special javascript:code
Answer» C. A URL that uses the special javascript:protocol
44.

What is the programming philosophy that argues that content and behaviour
should as much as possible be kept separate?

A. Unobtrusive JavaScript
B. Obtrusive JavaScript
C. Inherited JavaScript
D. Modular JavaScript
Answer» A. Unobtrusive JavaScript
45.

Which of the following communicates with server-side CGI scripts through HTML
form submissions and can be written without the use of JavaScript?

A. Static Web Pages
B. Interactive Web Pages
C. Conditional Web Pages
D. None of the mentioned
Answer» B. Interactive Web Pages
46.

______ tag is an extension to HTML that can enclose any number of JavaScript
statements.

A. <SCRIPT>
B. <BODY>
C. <HEAD>
D. <TITLE>
Answer» A. <SCRIPT>
47.

How does JavaScript store dates in a date object?

A. The number of milliseconds since January 1st, 1970
B. The number of days since January 1st, 1900
C. The number of seconds since Netscape's public stock offering.
D. None of the above
Answer» A. The number of milliseconds since January 1st, 1970
48.

Which of the following attribute can hold the JavaScript version?

A. LANGUAGE
B. SCRIPT
C. VERSION
D. None of the above
Answer» A. LANGUAGE
49.

What is the correct JavaScript syntax to write "Hello World"?

A. System.out.println("Hello World")
B. println ("Hello World")
C. document.write("Hello World")
D. response.write("Hello World")
Answer» C. document.write("Hello World")
50.

Which of the following way can be used to indicate the LANGUAGE attribute?

A. <LANGUAGE="JavaScriptVersion">
B. <SCRIPT LANGUAGE="JavaScriptVersion">
C. C. <SCRIPT LANGUAGE="JavaScriptVersion"> JavaScript statements…</SCRIPT>
D. D. <SCRIPT LANGUAGE="JavaScriptVersion"!> JavaScript statements…</SCRIPT>
Answer» C. C. <SCRIPT LANGUAGE="JavaScriptVersion"> JavaScript statements…</SCRIPT>

Done Studing? Take A Test.

Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.