For SEO rankings, I need to remove the "nofollow" attribute links from the entire site.
So far, I'm assuming I need to create a variable which grabs all the anchor tags, and then loop through it, but I'm not certain how to target the actual "nofollow" attribute, in order to remove it, once I've looped through everything.
const grabLink = document.getElementsByTagName("a");
for (let i = o; i < grabLink.length; i++ {
// would this be the correct approach?
grabLink[i].target = ""
}
If my approach is wrong, I'd like to hear an explanation as to why, so I can learn for next time.