I want to make a function like this.
const displayTextContent = (dom, content) => {
dom.textContent = content;
};
for the dom style property
but when I made a function for this, javascript didn't light up the second parameter in the parentheses ignored the parameter after the style
const elementsStyleFn =function (dom, type,s) {
dom.style.type=s
};
and pass parameters like the code below
elementsStyleFn(body,backgroundColor,'red')
in the consol say (backgroundColor) undefine
I hope my question Is clear enough.