What is this line of code in JavaScript x.style.backgroundColor = x.style.backgroundColor == "yellow" ? "pink" : "yellow";"
in the program written below?
<!DOCTYPE html>
<html>
<body>
<p>In this example, the setInterval() method executes the setColor() function once every 300 milliseconds, which will toggle between two background colors.</p>
<button onclick="stopColor()">Stop Toggling</button>
<script>
var myVar = setInterval(function(){ setColor() }, 300);
function setColor() {
var x = document.body;
x.style.backgroundColor = x.style.backgroundColor == "yellow" ? "pink" : "yellow";
}
function stopColor() {
clearInterval(myVar);
}
</script>
</body>
</html>