Tryingto write own js

lalalal

by Cosette Girardot

HTML

<div class="sign"> </div>

CSS

.open .sign { 
background-color:#00CC00;
width:406px;
height:181px;
}

.close .sign { 
background-color:#000000;
width: 406px;
height:181px;
}

JavaScript

var currentTime = new Date().getHours();
if (10 <= currentTime && currentTime < 20) {
if (document.body) {
    document.body.className += "open";
}
}
else {
if (document.body) {
    document.body.className = "close";
}
}