function closureFunction() { var message = "I'm from a closure!"; function logMessage() { console.log(message); } return logMessage; }
var x = 2; delete x; //false, x is not deleted y = 3; delete y; //true, y is deleted var obj = { y : 5 }; delete obj.y; //true, obj.y is deleted
By Ryan Lewis