Q. What will be the output of the following JavaScript code?

Code:
<script>
try{
    const cars = {  
        company: 'Honda'
    };  
    
    Object.seal(cars);
    delete cars.company;
    document.write(cars.company);  
}
catch (err){
    document.write(err.message);
}
</script>
  • (A) undefined
  • (B) Honda
  • (C) ValueError
  • (D) TypeError
πŸ’¬ Discuss
βœ… Correct Answer: (B) Honda

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
296
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
84%
Success Rate