Sail E0 Webinar

MCQs

Total Questions : 67 | Page 1 of 7 pages
Question 1. The behaviour of the instances present of a class inside a method is defined by
  1.    Method
  2.    Classes
  3.    Interfaces
  4.    Classes and Interfaces
 Discuss Question
Answer: Option B. -> Classes
Question 2. Consider the following code snippet :
var o = new F();
o.constructor === F
The output would be :
  1.    false
  2.    true
  3.    0
  4.    1
 Discuss Question
Answer: Option B. -> true
Question 3. The keyword or the property that you use to refer to an object through which they were invoked is
  1.    from
  2.    to
  3.    this
  4.    object
 Discuss Question
Answer: Option C. -> this
Question 4. The meaning for Augmenting classes is that
  1.    objects inherit prototype properties even in dynamic state
  2.    objects inherit prototype properties only in dynamic state
  3.    objects inherit prototype properties in static state
  4.    None of the mentioned
 Discuss Question
Answer: Option A. -> objects inherit prototype properties even in dynamic state
Question 5. The basic difference between JavaScript and Java is
  1.    There is no difference
  2.    Functions are considered as fields
  3.    Variables are specific
  4.    Functions are values, and there is no hard distinction between methods and fields
 Discuss Question
Answer: Option D. -> Functions are values, and there is no hard distinction between methods and fields
Question 6. The property of JSON() method is:
  1.    it can be invoked manually as object.JSON()
  2.    it will be automatically invoked by the compiler
  3.    it is invoked automatically by the JSON.stringify() method
  4.    it cannot be invoked in any form
 Discuss Question
Answer: Option C. -> it is invoked automatically by the JSON.stringify() method
Question 7. If A is the superclass and B is the subclass, then subclass inherting the superclass can be represented as
  1.    B=inherit(A);
  2.    B=A.inherit();
  3.    B.prototype=inherit(A);
  4.    B.prototype=inherit(A.prototype);
 Discuss Question
Answer: Option C. -> B.prototype=inherit(A);
Question 8. The snippet that filters the filtered set is
  1.    var t=new FilteredSet(s, {function(s) {return !(x instanceof Set);});
  2.    var t=new FilteredSet{function(s) {return !(x instanceof Set);});
  3.    var t=new FilteredSet(s, {function(s) {return (x instanceof Set);});
  4.    var t=new FilteredSet(s, {function(s) {return x;});
 Discuss Question
Answer: Option A. -> var t=new FilteredSet(s, {function(s) {return !(x instanceof Set);});
Question 9. When a class B can extend another class A, we say that
  1.    A is the superclass and B is the subclass
  2.    B is the superclass and A is the subclass
  3.    Both A and B are the superclass
  4.    Both A and B are the subclass
 Discuss Question
Answer: Option A. -> A is the superclass and B is the subclass
Question 10. The method that can be used to create new properties and also to modify the attributes of existing properties is
  1.    Object.defineProperty()
  2.    Object.defineProperties()
  3.    Both Object.defineProperty() and Object.defineProperties()
  4.    None of the mentioned
 Discuss Question
Answer: Option C. -> Both Object.defineProperty() and Object.defineProperties()

Latest Videos

Latest Test Papers