πŸ“Š JavaScript
Q. Which one of the following is the correct output for the given JavaScript code?
Code:
    const obj1 ={ property1:'15'};  
    const obj2 =Object.freeze(obj1);  
    obj2.property1='20';  
    console.log(obj2.property1);  
  • (A) Runtime error
  • (B) 20
  • (C) 15
  • (D) Compilation error
πŸ’¬ Discuss
βœ… Correct Answer: (C) 15

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
240
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Indresh Gehalot
Publisher
πŸ“ˆ
98%
Success Rate