Implement a function css(element, property, value) that sets the style of a DOM element.
The function should:
element.property as a string.value as a string or number.Examples
const div = document.createElement('div'); css(div, 'color', 'red'); console.log(div.style.color); // 'red' css(div, 'width', '100px'); console.log(div.style.width); // '100px'
JavaScript Function
No test results yet
Click "Run" to execute tests