(1)
The behaviour of the instances present of a class inside a method is defined by __________
Answer: Classes
Answer: Classes
Answer: this
var o = new F();o.constructor === F
Answer: true
Answer: Functions are values, and there is no hard distinction between methods and fields
Answer: objects inherit prototype properties even in a dynamic state
Answer: it is invoked automatically by the JSON.stringify() method
Answer: A is the superclass and B is the subclass
Answer: B.prototype=inherit(A);
Answer: var t=new FilteredSet(s, {function(s) {return !(x instanceof Set);});
Answer: Both Object.defineProperty() and Object.defineProperties()
const obj1 = { a: 10, b: 15, c: 18 }; const obj2 = Object.assign({c: 7, d: 1}, obj1); console.log(obj2.c, obj2.d);
Answer: 7,1
function person() { this.name = 'rahul'; } function obj() { obj.call(this) } obj.prototype = Object.create(person.prototype); const app = new obj(); console.log(app.name);
Answer: rahul
const object1 = {}; Object.defineProperties(object1, { property1: { value: 10 } }); console.log(object1.property1);
Answer: 10
const prototype1 = {}; const object1 = Object.create(prototype1); console.log(Object.getPrototypeOf(object1) === prototype1);
Answer: true
const obj1 = { property1: 2 }; Object.seal(object1); obj1.property1 =4; console.log(obj1.property1); delete obj1.property1;
Answer: Error