T Tam ca New member Sep 19, 2021 #1 What will be the output of the following JavaScript code? Code: const object1 = {}; Object.defineProperties(object1, { property1: { value: 10 } }); console.log(object1.property1); A. 0 B. 10 C. undefined D. error
What will be the output of the following JavaScript code? Code: const object1 = {}; Object.defineProperties(object1, { property1: { value: 10 } }); console.log(object1.property1); A. 0 B. 10 C. undefined D. error
T Trương Duy New member Sep 19, 2021 #2 Answer: b Explanation: Object.defineProperties() is a predefined function in the object library of javascript. The Object.defineProperties() method defines new or modifies existing properties directly on an object and returns the object. Upvote 0 Downvote
Answer: b Explanation: Object.defineProperties() is a predefined function in the object library of javascript. The Object.defineProperties() method defines new or modifies existing properties directly on an object and returns the object.