O Level Exam
Menu mobile
Home
Subjects
INFORMATION TECHNOLOGY TOOLS AND NETWORK BASIS
New
WEB DESIGNING AND PUBLISHING
New
PROGRAMMING AND PROBLEM SOLVING THROUGH PYTHON
New
INTERNET OF THINGS AND ITS APPLICATIONS
New
Previous Year Papers
Model Papers
Notification
Contact Us
MCQ : JAVSCRIPT AND ANGULAR JS For NIELIT O Level Exam
JAVSCRIPT AND ANGULAR JS For NIELIT O Level Exam
00:00:00
English
Hindi
Question No# :
01
out of 50
Which of the following is the property that is triggered in response to JS errors?
Which of the following is the property that is triggered in response to JS errors?
A.
onclick
onclick
B.
onerror
onerror
C.
onmessage
onmessage
D.
onexception
onexception
Question No# :
02
out of 50
Inside which HTML element do we put the JavaScript?
Inside which HTML element do we put the JavaScript?
A.
<javascript>
<javascript>
B.
<script>
<script>
C.
<scripting>
<scripting>
D.
<link>
<link>
Question No# :
03
out of 50
Which operator is used to assign a value to a variable?
Which operator is used to assign a value to a variable?
A.
=
=
B.
x
x
C.
==
==
D.
*
*
Question No# :
04
out of 50
What are the three important manipulations done in a for loop on a loop variable?
What are the three important manipulations done in a for loop on a loop variable?
A.
Updation, Incrementation, Initialization
Updation, Incrementation, Initialization
B.
Initialization,Testing, Updation
Initialization,Testing, Updation
C.
Testing, Updation, Testing
Testing, Updation, Testing
D.
Initialization,Testing, Incrementation
Initialization,Testing, Incrementation
Question No# :
05
out of 50
The purpose of extensible attribute is to __________
The purpose of extensible attribute is to __________
A.
make all of the own properties of that object non configurable
make all of the own properties of that object non configurable
B.
to configure and bring a writable property
to configure and bring a writable property
C.
“lock down” objects into a known state and prevent outside tampering
“lock down” objects into a known state and prevent outside tampering
D.
to include new properties into the object
to include new properties into the object
Question No# :
06
out of 50
The object has three object attributes namely ________
The object has three object attributes namely ________
A.
Class, parameters, object’s extensible flag
Class, parameters, object’s extensible flag
B.
Prototype, class, objects’ parameters
Prototype, class, objects’ parameters
C.
Prototype, class, object’s extensible flag
Prototype, class, object’s extensible flag
D.
Native object, Classes and Interfaces and Object’s extensible flag
Native object, Classes and Interfaces and Object’s extensible flag
Question No# :
07
out of 50
Which of the following is not a JavaScript datatype?
Which of the following is not a JavaScript datatype?
A.
Boolean
Boolean
B.
String
String
C.
Number
Number
D.
Function
Function
Question No# :
08
out of 50
How to write an IF statement for executing some code if "i" is NOT equal to 5?
How to write an IF statement for executing some code if "i" is NOT equal to 5?
A.
if (i <> 5)
if (i <> 5)
B.
if (i != 5)
if (i != 5)
C.
if i =! 5 then
if i =! 5 then
D.
if i <> 5
if i <> 5
Question No# :
09
out of 50
How many elements can a valid react component return?
How many elements can a valid react component return?
A.
React doesn’t return element
React doesn’t return element
B.
1 Element
1 Element
C.
More than 1 element
More than 1 element
D.
None of the mentioned
None of the mentioned
Question No# :
10
out of 50
Among the keywords below, which one is not a statement?
Among the keywords below, which one is not a statement?
A.
debugger
debugger
B.
with
with
C.
if
if
D.
use strict
use strict
Question No# :
11
out of 50
Which of the following directives is used to start an angularJS application?
Which of the following directives is used to start an angularJS application?
A.
ng-repeat
ng-repeat
B.
ng-init
ng-init
C.
ng-app
ng-app
D.
ng-model
ng-model
Question No# :
12
out of 50
How do you round the number 7.25, to the nearest integer?
How do you round the number 7.25, to the nearest integer?
A.
round(7.25)
round(7.25)
B.
Math.rnd(7.25)
Math.rnd(7.25)
C.
rnd(7.25)
rnd(7.25)
D.
Math.round(7.25)
Math.round(7.25)
Question No# :
13
out of 50
The script tag must be placed in __________
The script tag must be placed in __________
A.
the head tag
the head tag
B.
the head or body
the head or body
C.
the title or head
the title or head
D.
after the body tag
after the body tag
Question No# :
14
out of 50
JavaScript is ideal to ________
JavaScript is ideal to ________
A.
make computations in HTML simpler
make computations in HTML simpler
B.
minimize storage requirements on the web server
minimize storage requirements on the web server
C.
increase the download time for the client
increase the download time for the client
D.
increase the loading time of the website
increase the loading time of the website
Question No# :
15
out of 50
When an empty statement is encountered, a JavaScript interpreter __________
When an empty statement is encountered, a JavaScript interpreter __________
A.
Ignores the statement
Ignores the statement
B.
Prompts to complete the statement
Prompts to complete the statement
C.
Throws an error
Throws an error
D.
Shows a warning
Shows a warning
Question No# :
16
out of 50
Why event handlers is needed in JS?
Why event handlers is needed in JS?
A.
Allows JavaScript code to alter the behaviour of windows
Allows JavaScript code to alter the behaviour of windows
B.
Adds innerHTML page to the code
Adds innerHTML page to the code
C.
Change the server location
Change the server location
D.
Performs handling of exceptions and occurrences
Performs handling of exceptions and occurrences
Question No# :
17
out of 50
Which of the following is correct about JavaScript?
Which of the following is correct about JavaScript?
A.
JavaScript is an Object-Based language
JavaScript is an Object-Based language
B.
JavaScript is Assembly-language
JavaScript is Assembly-language
C.
JavaScript is an Object-Oriented language
JavaScript is an Object-Oriented language
D.
JavaScript is a High-level language
JavaScript is a High-level language
Question No# :
18
out of 50
How do you find the number with the highest value of x and y?
How do you find the number with the highest value of x and y?
A.
ceil(x, y)
ceil(x, y)
B.
Math.max(x, y)
Math.max(x, y)
C.
top(x, y)
top(x, y)
D.
Math.ceil(x, y)
Math.ceil(x, y)
Question No# :
19
out of 50
Which of the following is the correct syntax for writing AngularJS expressions?
Which of the following is the correct syntax for writing AngularJS expressions?
A.
{{expression}}
{{expression}}
B.
{{expression | filter1 | filter2 | …}}
{{expression | filter1 | filter2 | …}}
C.
Both of the mentioned
Both of the mentioned
D.
None of the mentioned
None of the mentioned
Question No# :
20
out of 50
Where is Client-side JavaScript code is embedded within HTML documents?
Where is Client-side JavaScript code is embedded within HTML documents?
A.
A URL that uses the special javascript:code
A URL that uses the special javascript:code
B.
A URL that uses the special javascript:protocol
A URL that uses the special javascript:protocol
C.
A URL that uses the special javascript:encoding
A URL that uses the special javascript:encoding
D.
A URL that uses the special javascript:stack
A URL that uses the special javascript:stack
Question No# :
21
out of 50
The snippet that has to be used to check if “a” is not equal to “null” is
A.
if(a!=null)
B.
if (!a)
C.
if(a!null)
D.
if(a!==null)
Question No# :
22
out of 50
The enumeration order becomes implementation dependent and non-interoperable if ___________
The enumeration order becomes implementation dependent and non-interoperable if ___________
A.
If the object inherits enumerable properties
If the object inherits enumerable properties
B.
The object does not have the properties present in the integer array indices
The object does not have the properties present in the integer array indices
C.
The delete keyword is never used
The delete keyword is never used
D.
Object.defineProperty() is not used
Object.defineProperty() is not used
Question No# :
23
out of 50
The unordered collection of properties, each of which has a name and a value is called _________
The unordered collection of properties, each of which has a name and a value is called _________
A.
String
String
B.
Object
Object
C.
Serialized Object
Serialized Object
D.
Array
Array
Question No# :
24
out of 50
What will happen if reverse() and join() methods are used simultaneously?
What will happen if reverse() and join() methods are used simultaneously?
A.
Reverses and stores in the same array
Reverses and stores in the same array
B.
Reverses and concatenates the elements of the array
Reverses and concatenates the elements of the array
C.
Reverses
Reverses
D.
Stores the elements of an array in normal order
Stores the elements of an array in normal order
Question No# :
25
out of 50
Which of the following object is the main entry point to all client-side JavaScript features and APIs?
Which of the following object is the main entry point to all client-side JavaScript features and APIs?
A.
Position
Position
B.
Window
Window
C.
Standard
Standard
D.
Location
Location
Question No# :
26
out of 50
What is the basic difference between JavaScript and Java?
What is the basic difference between JavaScript and Java?
A.
Functions are considered as fields
Functions are considered as fields
B.
Functions are values, and there is no hard distinction between methods and fields
Functions are values, and there is no hard distinction between methods and fields
C.
Variables are specific
Variables are specific
D.
There is no difference
There is no difference
Question No# :
27
out of 50
How to write an IF statement in JavaScript?
How to write an IF statement in JavaScript?
A.
if (i == 5)
if (i == 5)
B.
if i == 5 then
if i == 5 then
C.
if i = 5
if i = 5
D.
if i = 5 then
if i = 5 then
Question No# :
28
out of 50
Which of the following type of variable is visible everywhere in your JavaScript code?
Which of the following type of variable is visible everywhere in your JavaScript code?
A.
Global variable
Global variable
B.
Local variable
Local variable
C.
Both (a) and (b)
Both (a) and (b)
D.
None of the above
None of the above
Question No# :
29
out of 50
The primary purpose of the array map() function is that it __________
The primary purpose of the array map() function is that it __________
A.
maps the elements of another array into itself
maps the elements of another array into itself
B.
passes each element of the array and returns the necessary mapped elements
passes each element of the array and returns the necessary mapped elements
C.
passes each element of the array on which it is invoked to the function you specify, and returns an array containing the values returned by that function
passes each element of the array on which it is invoked to the function you specify, and returns an array containing the values returned by that function
D.
pass the elements of the array into another array
pass the elements of the array into another array
Question No# :
30
out of 50
Which of the following Attribute is used to include External JS code inside your HTML Document?
Which of the following Attribute is used to include External JS code inside your HTML Document?
A.
src
src
B.
ext
ext
C.
script
script
D.
link
link
Question No# :
31
out of 50
Which of the following is the correct syntax to display "enter password" in an alert box using JavaScript?
Which of the following is the correct syntax to display "enter password" in an alert box using JavaScript?
A.
alertbox("enter password");
alertbox("enter password");
B.
msg("enter password");
msg("enter password");
C.
msgbox("enter password");
msgbox("enter password");
D.
alert("enter password");
alert("enter password");
Question No# :
32
out of 50
“An expression that can legally appear on the left side of an assignment expression.” is a well known explanation for variables, properties of objects, and elements of arrays. They are called ___________
“An expression that can legally appear on the left side of an assignment expression.” is a well known explanation for variables, properties of objects, and elements of arrays. They are called ___________
A.
Properties
Properties
B.
Prototypes
Prototypes
C.
Lvalue
Lvalue
D.
Definition
Definition
Question No# :
33
out of 50
When does the function name become optional in JavaScript?
A.
When the function is defined as a looping statement
B.
When the function is defined as expressions
C.
When the function is predefined
D.
All of the above
Question No# :
34
out of 50
What will happen if the body of a for/in loop deletes a property that has not yet been enumerated?
What will happen if the body of a for/in loop deletes a property that has not yet been enumerated?
A.
The property will be stored in a cache
The property will be stored in a cache
B.
The loop will not run
The loop will not run
C.
That property will not be enumerated
That property will not be enumerated
D.
The property will be enumerated
The property will be enumerated
Question No# :
35
out of 50
Among the following, which one is a ternary operator?
Among the following, which one is a ternary operator?
A.
+
+
B.
:
:
C.
–
–
D.
?:
?:
Question No# :
36
out of 50
Which of the following acts as the input of a class-based component?
Which of the following acts as the input of a class-based component?
A.
Class
Class
B.
Props
Props
C.
Factory
Factory
D.
None of the mentioned
None of the mentioned
Question No# :
37
out of 50
AngularJS expressions bind AngularJS data to HTML like which of the following directive?
AngularJS expressions bind AngularJS data to HTML like which of the following directive?
A.
ng-repeat
ng-repeat
B.
ng-bind
ng-bind
C.
ng-app
ng-app
D.
ng-model
ng-model
Question No# :
38
out of 50
What will be the step of the interpreter in a jump statement when an exception is thrown?
What will be the step of the interpreter in a jump statement when an exception is thrown?
A.
The interpreter stops its work
The interpreter stops its work
B.
The interpreter throws another exception
The interpreter throws another exception
C.
The interpreter jumps to the nearest enclosing exception handler
The interpreter jumps to the nearest enclosing exception handler
D.
The interpreter throws an error
The interpreter throws an error
Question No# :
39
out of 50
What is the alternate name for Java script?
What is the alternate name for Java script?
A.
LimeScript
LimeScript
B.
ECMScript
ECMScript
C.
Coffee Script
Coffee Script
D.
ECMAScript
ECMAScript
Question No# :
40
out of 50
Which of the following is an advantage of AngularJS?
Which of the following is an advantage of AngularJS?
A.
Uses dependency injection and makes use of separation of concerns
Uses dependency injection and makes use of separation of concerns
B.
Code is unit-testable
Code is unit-testable
C.
Provides reusable components
Provides reusable components
D.
All of the mentioned
All of the mentioned
Question No# :
41
out of 50
The script tag must be placed in
The script tag must be placed in
A.
Head
Head
B.
Head and body
Head and body
C.
Title and Head
Title and Head
D.
All of the above
All of the above
Question No# :
42
out of 50
Which of the following explains correctly what happens when a JavaScript program is developed on a Unix Machine?
Which of the following explains correctly what happens when a JavaScript program is developed on a Unix Machine?
A.
will work perfectly well on a Windows Machine
will work perfectly well on a Windows Machine
B.
will be displayed as JavaScript text on the browser
will be displayed as JavaScript text on the browser
C.
will throw errors and exceptions
will throw errors and exceptions
D.
must be restricted to a Unix Machine only
must be restricted to a Unix Machine only
Question No# :
43
out of 50
One of the special features of an interpreter in reference with the for loop is that ___________
One of the special features of an interpreter in reference with the for loop is that ___________
A.
Before each iteration, the interpreter evaluates the variable expression and assigns the name of the property
Before each iteration, the interpreter evaluates the variable expression and assigns the name of the property
B.
The iterations can be infinite when an interpreter is used
The iterations can be infinite when an interpreter is used
C.
The body of the loop is executed only once
The body of the loop is executed only once
D.
the iteration is finite when an interpreter is used
the iteration is finite when an interpreter is used
Question No# :
44
out of 50
The statement a===b refers to
A.
Both a and b are equal in value, type and reference address
B.
Both a and b are equal in value
C.
Both a and b are equal in value and type
D.
None of these
Question No# :
45
out of 50
Which attribute is used to specify that the script is executed when the page has finished parsing? (only for external scripts)
Which attribute is used to specify that the script is executed when the page has finished parsing? (only for external scripts)
A.
parse
parse
B.
a sync
a sync
C.
defer
defer
D.
type
type
Question No# :
46
out of 50
To determine whether one object is the prototype of (or is part of the prototype chain of) another object, one should use the ____________
To determine whether one object is the prototype of (or is part of the prototype chain of) another object, one should use the ____________
A.
isPrototypeOf() method
isPrototypeOf() method
B.
equals() method
equals() method
C.
=== operator
=== operator
D.
==opertor
==opertor
Question No# :
47
out of 50
A linkage of series of prototype objects is called as ________
A linkage of series of prototype objects is called as ________
A.
prototype stack
prototype stack
B.
prototype chain
prototype chain
C.
prototype class
prototype class
D.
prototypes
prototypes
Question No# :
48
out of 50
How can you add a comment in a JavaScript?
How can you add a comment in a JavaScript?
A.
<!--This is a comment-->
<!--This is a comment-->
B.
//This is a comment
//This is a comment
C.
'This is a comment
'This is a comment
D.
#This is a comment
#This is a comment
Question No# :
49
out of 50
Which of the following scoping type does JavaScript use?
Which of the following scoping type does JavaScript use?
A.
Sequential
Sequential
B.
Segmental
Segmental
C.
Lexical
Lexical
D.
Literal
Literal
Question No# :
50
out of 50
What is the correct way to write a JavaScript array?
What is the correct way to write a JavaScript array?
A.
var colors = 1 = ("red"), 2 = ("green"), 3 = ("blue")
var colors = 1 = ("red"), 2 = ("green"), 3 = ("blue")
B.
var colors = (1:"red", 2:"green", 3:"blue")
var colors = (1:"red", 2:"green", 3:"blue")
C.
var colors = "red", "green", "blue"
var colors = "red", "green", "blue"
D.
var colors = ["red", "green", "blue"]
var colors = ["red", "green", "blue"]
CCC Online Test 2021
CCC Practice Test Hindi
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
Best Java Training Institute in Prayagraj (Allahabad)
Best Python Training Institute in Prayagraj (Allahabad)
O Level NIELIT Study material and Quiz
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Sarkari Naukari Notification
Best Website and Software Company in Allahabad
Website development Company in Allahabad