Keep getting NaN instead of 0
<p>This is a function that retrieves results from Bing and populates an Object array. </p>

<pre><code>callBing: function (query, callback) {
    var url = 'http://localhost/meta/public/bing/'+query ; 
    $.getJSON(url, function(data) {
        total_bing = data.d.results[0].WebTotal;
        var j = 0 ;
        $.each(data.d.results[0].Web, function() {
            var obj = new res(j+1, this.Title, this.Description, this.Url, 0) ; 
            b.push(obj) ; 
            j=j+1 ;
        });
        console.log(b);
        callback(b, total_bing);
    });
},
</code></pre>

<p>And this is the constructor for the res objects </p>

<pre><code>function res(id,title,desc,url,score)
{
    this.id=id;
    this.title=title;
    this.desc=desc;
    this.url=url;
    this.score=score;
    this.changeRankScore=changeRankScore;
    function changeRankScore(Rankscore)
    {
        this.score=Rankscore;
        return Rankscore; 
    }


}
</code></pre>

<p>As you can see, when each result is retrieved for the constructor, it populates the array with the results object. </p>

<p>The results objects' score is the last parameter in the constructor which is 0 but it is displaying as <strong><code>NaN</code></strong> in the console. </p>

<p>Here is a screenshot
<a href="http://i.stack.imgur.com/KTFsr.png" rel="nofollow"><img src="http://i.stack.imgur.com/KTFsr.png" alt="enter image description here"></a></p>
