Realated Questions
Which one of the following options is the correct output for the given code of JavaScript?
const person = { name: "James", getName:function() { return this.name; } }; const unboundName = person.getName; const boundName = unboundName.bind(person); console.log(boundName());
Which one of the following is the correct output for the given JavaScript code?
const obj ={prop:12}; Object.preventExtensions(obj); console.log(Object.isExtensible(obj));
Which one of the following is the correct output for the given JavaScript code?
const obj1 = { property1:'15'}; const obj2 = Object.freeze(obj1); obj2.property1 = '20'; console.log(obj2.property1);