How to remove property from object in es6
const myObject = {
"name": "my name",
"city": "my city",
"age": 18
};
we want to remove age property from above object
we want to remove age property from above object
delete myObject.age;
delete myObject['age'];
Comments