Consider this program:
(function(x){
delete x;
return x;
})(1);
What is the output?
It happens to be 1 and not undefined as I expected. I thought x purely is in the scope of function and deleting it inside the function should have made it inaccessible to outside it.
Can someone throw a little light on this?
See the manual for delete:
and
A variable is not a property.