I have this script:
price2 = document.getElementById('price2');
price3 = document.getElementById('price3');
for (var i = 0; i < price2.length; i++) {
price2[i].style.backgroundColor = 'orange';
}
<div class="single-car-prices">
<div class="single-regular-price text-center" id="price2">
<span class="labeled">Ціна</span>
<span class="h3"> $ 1.500</span>
</div>
</div>
Why color of this div is still blue:
There is no errors in console, I think I wrote JS correctly
