object.assign javascript styles code example
Example 1: javascript assign
const obj = { a: 1 };
const copy = Object.assign({}, obj);
console.log(copy); // { a: 1 }
Example 2: set multiple attributes css javascript
document.getElementById("myElement").style.cssText = "display: block; position: absolute";