HTML Design
<div class="custom-container color-red">
<h3>Hello, I am a customized container</h3>
</div>
Javascript Logic
let element = document.getElementsByClassName('custom-container')[0];
let classes = element.classList;
Array.from(classes)[0] = "background";
"Arrays are mutable and can be changed. However, the first item in the array is not being replaced with 'background' as expected."