Q. What will be the output of the following JavaScript code?
Code:
<script>
try{
const cars = {
company: 'Honda'
};
delete cars.company;
document.write(cars.company);
}
catch (err){
document.write(err.message);
}
</script>
β
Correct Answer: (A)
undefined