Answers for "remove attribute from object js"

6

remove attribute javascript

document.getElementsByTagName("H1")[0].removeAttribute("class");
Posted by: Guest on June-19-2020
1

how to delete a property from a javascript object

var person = {
  firstName:"John",
  lastName:"Doe",
  age:50,
  eyeColor:"blue"
};

delete person.age;  // or delete person["age"];

// Before deletion: person.age = 50, after deletion, person.age = undefined
Posted by: Guest on May-24-2021

Code answers related to "remove attribute from object js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language