const employee = {
id:1,
name: 'ofir',
salary: 1000
};
const {salary, ...newEmployee } = employee;
console.log( newEmployee );
// { id: 1, name: 'ofir' }
/***** OR ******/
delete employee.salary;
console.log( employee );
// { id: 1, name: 'ofir' }
delete object.element
delete object.element;
var obj = {
func: function(a, b) {
return a + b;
}
};
delete obj.func;
obj.func(); // Uncaught TypeError: obj.func is not a function
View for deleting an object retrieved with self.get_object(), with a
response rendered by a template.
View for deleting an object retrieved with self.get_object(), with a
response rendered by a template.
delete object in javascript
remove element from an object