Ciao a tutti come posso aggiungere piu attributi ad un tag ad esempio:

codice:
const el = document.querySelector(".mydiv");
el.appendChild(document.createElement("a")).setAttribute("href", "...").setAttribute("target", "_Black");
cosi scrivendo mi da errore come posso inserire sia l'attributo href che target sulla stessa riga?