What will be the output of the following JavaScript code? const obj1 = { ...
View Question
What will be the output of the following JavaScript code?
const prototype1 = {};
const object1 = Object.create(prototype1);
console.log(Object.getPrototypeOf(object1) === prototype1);
What will be the output of the following JavaScript code? const prototype1 = {}; const object1 ...
View Question
What will be the output of the following JavaScript code?
const object1 = {};
Object.defineProperties(object1,
{
property1:
{
value: 10
}
});
console.log(object1.property1);
What will be the output of the following JavaScript code? const object1 = {}; Object.defineProperties(object1, { ...
View Question
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);
What will be the output of the following JavaScript code? function person() { ...
View Question
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);
What will be the output of the following JavaScript code? const obj1 = { ...
View QuestionThe method that can be used to create new properties and also to modify the attributes of existing properties is _________
The method that can be used to create new properties and also to modify the attributes of existing ...
View QuestionThe 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 ...
View QuestionIf A is the superclass and B is the subclass, then subclass inheriting 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); Answer: c Explanation: inherit() function is a predefined function in javascript ...
View QuestionWhen 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 ...
View QuestionThe 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 ...
View Question