js object delete all properties code example
Example 1: javascript remove element from object
delete object.element
Example 2: nodejs delete object key
delete obj.firstname;
Example 3: javascript remove function from object
var obj = {
func: function(a, b) {
return a + b;
}
};
delete obj.func;
obj.func(); // Uncaught TypeError: obj.func is not a function