I'm trying to set the background color of an HTML element using CSS properties in JavaScript, but I'm facing some issues.

I have a <div> element with the ID myElement and I want to change its background color dynamically using JavaScript.

I know I can do this using the style property, but I'm not sure how to specify the background color using CSS properties. Can someone help me with this?