MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
Javascript
Classes And Modules
Quiz 3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Q.1
What will be the result when non greedy repetition is used on the pattern /a+?b/ ?
Matches the letter b preceded by the fewest number of a’s possible
Matches the letter b preceded by any number of a
Matches letter a preceded by letter b, in the stack order
None of the mentioned
Q.2
What does the subexpression /java(script)?/ result in ?
It matches “java” followed by the optional “script”
It matches “java” followed by any number of “script”
It matches “java” followed by a minimum of one “script”
None of the mentioned
Q.3
To define each of the set classes as a property of the sets object (namespace) for the module, the statement is
sets = sets.AbstractEnumerableSet.extend();
sets.SingletonSet = sets.AbstractEnumerableSet.extend(...);
sets.SingletonSet = sets.extend(...);
sets = sets.extend(...);
Q.4
Consider the following statement
var
Set
=
sets
.
Set;
var
s
=
new
Set
(
1
,
2
,
3
)
;
What could be the efficiency quotient of the above two statements ?
The programmer imports at once the frequently used values into the global namespace
There is no efficiency quotient, the programmer tries to make it inefficient
The programmer needs to import the Sets everytime he wants to use it
All of the mentioned
Q.5
What can be done in order to avoid creation of global variables in JavaScript?
To use a method that defines all the variables
To use an object that has the reference to all the variables
To use an object as its namespace
To use global functions
Q.6
The ‘$’ present in the RegExp object is called a
character
matcher
metacharacter
metadata
Q.7
Which is the correct code that returns a complex number that is the complex conjugate of this one?
Complex.prototype.conj = function() { return new Complex(this.r, -this.i); };
Complex.prototype.conj = function() { return Complex(this.r, -this.i); };
Complex.prototype.conj = function() { return (this.r, -this.i); };
Complex.prototype.conj = function() { new Complex(this.r, -this.i); };
Q.8
The scope of a function is also called as
The function’s scope
Module function
Modulated function
Private function
Q.9
How can we make methods available on all objects?
Object.add(methods)
Object.methods(add)
Object.add.methods(…)
Object.prototype
Q.10
What is the procedure to add methods to HTMLElement so that they will be inherited by the objects that represent the HTML tags in the current document?
HTMLElement.prototype(…)
HTMLElement.prototype
HTML.addmethods()
HTML.elements(add)
Q.11
Modules that have more than one item in their API can
Assign itself to a global variable
Invoke another module of the same kind
Return a namespace object
Invoke another module of the same kind
Q.12
You can refresh the webpage in JavaScript by using
window.reload
location.reload
window.refresh
page.refresh
Q.13
The functions provide() and require() of Dojo toolkit and Google’s Closure library are used for
declaring and loading modules
loading and declaring modules
declaring modules
none of the mentioned
Q.14
The four kinds of class members are
Instance methods, Instance fields, Static method, Dynamic method
Instance fields, Instance methods, Class fields, Class methods
Instance fields, Non-instance fields, Dynamic methods, Global methods
Global methods, Local methods, Dynamic methods, Static methods
Q.15
The properties of the objects act like different kinds of class members. They are
Public object, Private object, Protected object
Constructor object, Function object, Destructor object
Constructor object, Prototype object, Instance object
Instance method, Static object, Dynamic object
Q.16
The object whose properties are inherited by all instances of the class, and properties whose values are functions behaving like instance methods of the class, is
Instance object
Constructor object
Destructor object
Prototype object
Q.17
Which are usually variables that are used internally in object methods and also are globally visible variables?
Object properties
Variable properties
Method properties
Internal properties
Q.18
The class that represents the regular expressions is
RegExpObj
RegExpClass
RegExp
StringExp
Q.19
The property of JSON() method is:
it can be invoked manually as object.JSON()
it will be automatically invoked by the compiler
it is invoked automatically by the JSON.stringify() method
it cannot be invoked in any form
Q.20
When a class B can extend another class A, we say that
A is the superclass and B is the subclass
B is the superclass and A is the subclass
Both A and B are the superclass
Both A and B are the subclass
0 h : 0 m : 1 s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page