const elem = document.getElementById('elemenent') elem.onmouseout = function () { alert('mouse out occured!') }