const box = document.getElementsByClassName('box');
let colorAsString = '#FEC6F0';
let colorAsNumber = #FEC6F0;
Array.from(box).forEach((element) =>{
element.style.backgroundColor = colorAsString;
element.style.backgroundColor = colorAsNumber;
});
I stored a hex-color value in string as well as a number and pass the variable as a value for css property.
Why this code not work can you explain me…!