function removeProperty(obj, prop) { if(prop in obj){ delete obj[prop]; return true; }else{ return false; } } code example
Example: removeProperty(obj, prop)
function removeProperty(obj, prop) {
if (obj[prop] != undefined) {
delete obj[prop];
return true;
} else {
return false;
}
return null;
}