const elementBox = document.getElementsByClassName('box');
let colorAsStringVariable = '#FEC6F0';
let colorAsNumberVariable = #FEC6F0;
Array.from(elementBox).forEach((element) =>{
element.style.backgroundColor = colorAsStringVariable;
element.style.backgroundColor = colorAsNumberVariable;
});
I have two variables storing a hex-color value as a string and a number. I then use these variables as values for CSS properties on the elements with the class 'box'. Can someone explain why this code is not working for me?