Remove Properties in Object

Code Structure
var person = {
 firstName : "Bill",
 lastName : "Gates",
 age : 30,
 occupation : "IT Manager"
}
delete person.age;
alert(person.firstName + " is " + person.age + " years old.");

Share this

Related Posts