Сергей Ракипов,
ну тогда типа того
const countries = [{name: "Afghanistan", url: '123'}, {name: "Albania", url: '321'}];
const links = countries.map(el => {const a = document.createElement("a");
Object.assign(a, {text: el.name, href : el.url, className : "fon"});
return a;
})
document.body.append(...links)
|