title: JavaScript . could not understand why my first console statement gives an undefined
body: <pre><code>function person(name){
  
     this.name1 = "His";
  
     this.day = {};
     this.day.time="kokok";
  
  
      this.check = function(name){
  
      for(var i in this)  console.log(this["i"]);
  
      if(this.name1===name) console.log("ready"+this.day.time);
       };
   }
  
  
   var t= new person("His");
   t.check("His");
  </code></pre>