Javascript pada fokus hilang

<input type="text" onfocusout="myFunction()">
<script>
  function myFunction(){
 	console.log("Focus Lost!") 
 }
</script>
Undefined