Home / CSE / Javascript - CS :: Classes and Modules

CSE :: Javascript - CS

  1. The behaviour of the instances present of a class inside a method is defined by

  2. A.

     Method

    B.

     Classes

    C.

     Interfaces

    D.

     Classes and Interfaces

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. The keyword or the property that you use to refer to an object through which they were invoked is

  4. A.

     from

    B.

     to

    C.

     this

    D.

     object

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Consider the following code snippet :

    var o = new F();

    o.constructor === F

    The output would be :

  6. A.

     false

    B.

     true

    C.

     0

    D.

     1

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. The basic difference between JavaScript and Java is

  8. 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

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. The meaning for Augmenting classes is that

  10. 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

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. The property of JSON() method is:

  12. 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

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. When a class B can extend another class A, we say that

  14. 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

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. If A is the superclass and B is the subclass, then subclass inherting the superclass can be represented as

  16. A.

     B=inherit(A);

    B.

     B=A.inherit();

    C.

     B.prototype=inherit(A);

    D.

     B.prototype=inherit(A.prototype);

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. The snippet that filters the filtered set is

  18. 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;});

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. The method that can be used to create new properties and also to modify the attributes of existing properties is

  20. A.

     Object.defineProperty()

    B.

     Object.defineProperties()

    C.

     Both Object.defineProperty() and Object.defineProperties()

    D.

     None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum