Answers for "implement the remove property function which takes an object and property name"

0

implement the remove property function

function removeProperty(obj, prop) {
  
  if (obj.hasOwnProperty(prop)) { 
    delete obj[prop];
    return true;
  }

  return false;
}
Posted by: Guest on September-30-2020

Code answers related to "implement the remove property function which takes an object and property name"

Code answers related to "Javascript"

Browse Popular Code Answers by Language