title: Please explain automatically global in javascript
body: <p>I cannot understand the idea behind automatically global.  I am reading the following: 
  <a href="https://www.w3schools.com/js/js_scope.asp" rel="nofollow noreferrer">https://www.w3schools.com/js/js_scope.asp</a> </p>
  
  <p><a href="https://www.w3schools.com/js/tryit.asp?filename=tryjs_local_global" rel="nofollow noreferrer">https://www.w3schools.com/js/tryit.asp?filename=tryjs_local_global</a></p>
  
  <p>The function myFunction() is called. if I remove this call it displays nothing.  I can't understand why the call to myFunction() is necessary for the undeclared variable in myFunction() to be automatically global.  Seems not so intuitive.  </p>