js
🧩 Syntax:
const aElems = document.querySelectorAll("a")
const links = []
for (let i = 0; i < aElems.length; i++) {
links.push(aElems[i].href)
}
console.log(links);const aElems = document.querySelectorAll("a")
const links = []
for (let i = 0; i < aElems.length; i++) {
links.push(aElems[i].href)
}
console.log(links);