<script>
var myVar = setInterval(function(){setColor()},1000);
function setColor(){
var x = document.body;
x.style.backgroundColor = x.style.backgroundColor == "yellow"?"pink":"yellow";
}
</script>
I don't understand in this part:
x.style.backgroundColor == "yellow"?"pink":"yellow";
I try to add some color like this:
x.style.backgroundColor == "yellow"?"pink":"blue":"yellow";
but the script doesn't work.