πŸ“Š JavaScript
Q. Which one of the given options can be considered as the correct output for the following JavaScript code?
Code:
const obj1 =  
{  
    a:10,  
    b:15,  
    c:18  
};  
const obj2 =Object.assign({c:7, d:1}, obj1);  
const obj2 =Object.assign({c:7, d:1}, obj1);  
console.log(obj2.c, obj2.d);  
  • (A) Undefined
  • (B) 18,1
  • (C) 7,1
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (C) 7,1

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
178
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
99%
Success Rate