Mark As Completed Discussion

This code will output undefined as output. The delete operator is used to delete a property from an object. Here, x is an object which has foo as a property. From the self-invoking function, we are deleting the foo property of object x. After deletion, we are trying to reference the deleted property foo, which results in undefined.

Source
JAVASCRIPT
OUTPUT
:001 > Cmd/Ctrl-Enter to run, Cmd/Ctrl-/ to comment