How to assign property under functions?
<p>I am trying to assign the property under a function. I have</p>

<pre><code>test.prototype.getName = function(){
    var myself=this;

     //ajax callback function
      call.callback = function(obj){

     //I want to assign returned ajax obj to test property.       
        myself.testName=obj;
      }

}


test.prototype.build = function(){

this.getName();

console.log(this.testName)//undefined...

}


test.build();
</code></pre>

<p>How do I get the this.testName shown in my build function? Thanks a lot!</p>
