I'm programming in javascript, I tryed to put a code like this, but it doesn't work. could someone help me?
let header = document.getElementById('header1');
if (header.style.backgroundColor == "red") {
console.log('The header is red');
}