var text = document.getElementById('text') text.addEventListener("mouseout", function() { text.textContent = "cat" }) text.addEventListener("mouseover", function() { text.textContent = "dog" })
OK
JOSEPH STRAUCH
JOSEPH STRAUCH