https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute
removeAttribute(attrName)
document.getElementById("div1").removeAttribute("align");
let subMenuLinks = document.querySelectorAll('.sub-menu li a');
for (i = 0; i < subMenuLinks.length; i++) {
console.log(subMenuLinks[i]);
subMenuLinks[i].removeAttribute('href');
}
Have any questions or comments? Write them below!