1.

What Will Be The Output Of The Following Code? var X = 1; var Output = (function() { Delete X; Return X; } )();  console.log(output);

Answer»

The OUTPUT WOULD be 1. The delete OPERATOR is USED to delete the property of an object. Here x is not an object, but RATHER it's the global variable of type number.

The output would be 1. The delete operator is used to delete the property of an object. Here x is not an object, but rather it's the global variable of type number.



Discussion

No Comment Found