My code is:
var isBackgroundApplied = 0;
var button = document.getElementsByClassName("change");
button.addEventListener("click",function(){
if(isBackgroundApplied === 0){
document.querySelector("body").style.color = "blue";
isBackgroundApplied = 1;
}else{
document.querySelector("body").style.color = "white";
isBackgroundApplied == 0;
}
});
Please help me, the task for the code is to change background color on click.