152). 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

Show Answer

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

[A]from
[B]to
[C]this
[D]object

Show Answer

154). What will be the output of the following JavaScript code?
var o = new F();
o.constructor === F

[A] false
[B]true
[C]0
[D]1

Show Answer

155). The basic difference between JavaScript and Java is _________
var o = new F();
o.constructor === F

[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

Show Answer

156). The meaning for Augmenting classes is that ___________
var o = new F();
o.constructor === F

[A]objects inherit prototype properties even in a dynamic state
[B]objects inherit prototype properties only in a dynamic state
[C]objects inherit prototype properties in the static state
[D]object doesn’t inherit prototype properties in the static state

Show Answer

157). The property of JSON() method is __________
var o = new F();
o.constructor === F

[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

Show Answer

158). When a class B can extend another class A, we say that?
var o = new F();
o.constructor === F

[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

Show Answer

159). If A is the superclass and B is the subclass, then subclass inheriting the superclass can be represented as _________
var o = new F();
o.constructor === F

[A]B=inherit(A);
[B]B=A.inherit();
[C]B.prototype=inherit(A);
[D] B.prototype=inherit(A.prototype);

Show Answer

160). The snippet that filters the filtered set is __________
var o = new F();
o.constructor === F

[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;});

Show Answer

161). The method that can be used to create new properties and also to modify the attributes of existing properties is _________
var o = new F();
o.constructor === F

[A]Object.defineProperty()
[B] Object.defineProperties()
[C]Both Object.defineProperty() and Object.defineProperties()
[D] Object.inherit()

Show Answer

162). What will be the output of the following JavaScript code?
const obj1 = 
{  
  	a: 10,  
  	b: 15,  
  	c: 18  
};  
const obj2 = Object.assign({c: 7, d: 1}, obj1);  
console.log(obj2.c, obj2.d);

[A]7,1
[B]18,1
[C]Undefined
[D]Error

Show Answer

163). What will be the output of the following JavaScript code?
function person()
{  
        this.name = 'rahul';  
}  
function obj() 
{  
       obj.call(this)  
}  
obj.prototype = Object.create(person.prototype);  
const app = new obj();  
console.log(app.name);

[A]undefined
[B]runtime error
[C]compilation error
[D]rahul

Show Answer

164). What will be the output of the following JavaScript code?
const object1 = {};  
Object.defineProperties(object1,
{  
  	property1: 
        {  
             value: 10 
        }  
 });  
console.log(object1.property1);

[A]0
[B]10
[C]undefined
[D]error

Show Answer

165). What will be the output of the following JavaScript code?
const prototype1 = {};  
const object1 = Object.create(prototype1);  
console.log(Object.getPrototypeOf(object1) === prototype1);

[A]true
[B]false
[C]error
[D]0

Show Answer

166). What will be the output of the following JavaScript code?
const obj1 = {  
  property1: 2  
};  
Object.seal(object1);    
obj1.property1 =4;  
console.log(obj1.property1);  
delete obj1.property1;

[A]2
[B]4
[C]Error
[D]Undefined

Show Answer