links = document.querySelectorAll('a');
console.log(links);
links_href = document.querySelectorAll('a').getAttribute('href');
console.log(links_href);
const links = document.querySelectorAll('a');
// или
const links = document.getElementsByTagName('a');
const getHref = el => el.getAttribute('href');
// или
const getHref = el => el.attributes.href.value;
const hrefs = Array.from(links, getHref);
// или
const hrefs = Array.prototype.map.call(links, getHref);
// или
const hrefs = [];
for (const n of links) {
hrefs.push(getHref(n));
}
// или
const hrefs = [];
for (let i = 0; i < links.length; i++) {
hrefs[i] = getHref(links[i]);
}