implement remove property function code example
Example: implement the remove property function
function removeProperty(obj, prop) {
if (obj.hasOwnProperty(prop)) {
delete obj[prop];
return true;
}
return false;
}
function removeProperty(obj, prop) {
if (obj.hasOwnProperty(prop)) {
delete obj[prop];
return true;
}
return false;
}