title: i am confused with java Script functions
body: <p>so this is some code</p>
  
  <pre><code>var name = 'ali';
  
  function say() {
    alert(name);
  }
  </code></pre>
  
  <p>so this will alert 'ali' as name function is owned by global object now the following code</p>
  
  <pre><code>var oobj  { 
    var name: 'raziq',
    say:function () {
      alert (name);
    }
  }
  
  oobj.say();
  </code></pre>
  
  <p>so now the say function is owned by oobj object so the name property should alert 'raziq'
  instead of 'ali'. by the way i know the use of this keyword </p>
  
  <p>my question is what will be alerted and y ?</p>