I am unable to change dom element style with JavaScript function. Element id and style value can be passed to function as parameters but style parameter(example "color") will not passed. Is there any good way to resolve it? "first" - element id "color" - style parameter "green" - style value
styleToDom("first", "color", "green")
function styleToDom(id, parameter, value){
document.getElementById(id).style.parameter = value
}