The behaviour of the instances present of a class inside a method is defined by
A. Method
B. Classes
C. Interfaces
D. Classes and Interfaces
Select an option to see the answer and solution.
The keyword or the property that you use to refer to an object through which they were invoked is
Select an option to see the answer and solution.
Consider the following code snippet :
var o = new F() ;
o. constructor === F
The output would be :
Select an option to see the answer and solution.
The basic difference between JavaScript and Java is
A. There is no difference
B. Functions are considered as fields
C. Variables are specific
D. Functions are values, and there is no hard distinction between methods and fields
Select an option to see the answer and solution.
The meaning for Augmenting classes is that
A. objects inherit prototype properties even in dynamic state
B. objects inherit prototype properties only in dynamic state
C. objects inherit prototype properties in static state
D. None of the mentioned
Select an option to see the answer and solution.
The property of JSON() method is:
A. it can be invoked manually as object.JSON()
B. it will be automatically invoked by the compiler
C. it is invoked automatically by the JSON.stringify() method
D. it cannot be invoked in any form
Select an option to see the answer and solution.
When a class B can extend another class A, we say that
A. A is the superclass and B is the subclass
B. B is the superclass and A is the subclass
C. Both A and B are the superclass
D. Both A and B are the subclass
Select an option to see the answer and solution.
If A is the superclass and B is the subclass, then subclass inherting the superclass can be represented as
A. B=inherit(A);
B. B=A.inherit();
C. B.prototype=inherit(A);
D. B.prototype=inherit(A.prototype);
Select an option to see the answer and solution.
The snippet that filters the filtered set is
A. var t=new FilteredSet(s, {function(s) {return !(x instanceof Set);});
B. var t=new FilteredSet{function(s) {return !(x instanceof Set);});
C. var t=new FilteredSet(s, {function(s) {return (x instanceof Set);});
D. var t=new FilteredSet(s, {function(s) {return x;});
Select an option to see the answer and solution.
The method that can be used to create new properties and also to modify the attributes of existing properties is
A. Object.defineProperty()
B. Object.defineProperties()
C. Both Object.defineProperty() and Object.defineProperties()
D. None of the mentioned
Select an option to see the answer and solution.
The four kinds of class members are
A. Instance methods, Instance fields, Static method, Dynamic method
B. Instance fields, Instance methods, Class fields, Class methods
C. Instance fields, Non-instance fields, Dynamic methods, Global methods
D. Global methods, Local methods, Dynamic methods, Static methods
Select an option to see the answer and solution.
The properties of the objects act like different kinds of class members. They are
A. Public object, Private object, Protected object
B. Constructor object, Function object, Destructor object
C. Constructor object, Prototype object, Instance object
D. Instance method, Static object, Dynamic object
Select an option to see the answer and solution.
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
A. Instance object
B. Constructor object
C. Destructor object
D. Prototype object
Select an option to see the answer and solution.
Which are usually variables that are used internally in object methods and also are globally visible variables?
A. Object properties
B. Variable properties
C. Method properties
D. Internal properties
Select an option to see the answer and solution.
The class that represents the regular expressions is
A. RegExpObj
B. RegExpClass
C. RegExp
D. StringExp
Select an option to see the answer and solution.
Which is the correct code that returns a complex number that is the complex conjugate of this one?
A. Complex.prototype.conj = function() { return new Complex(this.r, -this.i); };
B. Complex.prototype.conj = function() { return Complex(this.r, -this.i); };
C. Complex.prototype.conj = function() { return (this.r, -this.i); };
D. Complex.prototype.conj = function() { new Complex(this.r, -this.i); };
Select an option to see the answer and solution.
How can we make methods available on all objects?
A. Object.add(methods)
B. Object.methods(add)
C. Object.add.methods(…)
D. Object.prototype
Select an option to see the answer and solution.
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?
A. HTMLElement.prototype(…)
B. HTMLElement.prototype
C. HTML.addmethods()
D. HTML.elements(add)
Select an option to see the answer and solution.
You can refresh the webpage in JavaScript by using
A. window.reload
B. location.reload
C. window.refresh
D. page.refresh
Select an option to see the answer and solution.
The functions provide() and require() of Dojo toolkit and Google’s Closure library are used for
A. declaring and loading modules
B. loading and declaring modules
C. declaring modules
D. none of the mentioned
Select an option to see the answer and solution.