I need a function, that changes the value of a passed attribute. You find an non-functioning example below. How do I have to pass the attribute and access the parameter? Thank you in advance!
let top = {target: document.getElementById("header").style.top};
animate(top, 50);
function foo(attribute, value) {
//some code
attribute.target = value + "px";
}