Javascript: parameter takes a random value when not passed in a callback function
<p>I am doing an ajax poll periodically. To achieve the same I have the following line of code:</p>

<pre><code>window.setInterval(pollForBids, 5000);
</code></pre>

<p>The function pollForBids is defined as follows:</p>

<pre><code>function pollForBids(supplierId){
    alert(supplierId);
    $.ajax({
      method: "GET",
      url : "/enterprize-sourcing/refreshBids.do",
      async : true,
      cache : false,
      data  : {action   : "refreshList", 
               eventId  : eventId,
        lastRetrieveTime: makeFinite(latestBidTime, 0),
             supplierId : makeFinite(supplierId, "")},
      success: function(xml){
        refreshBids(xml);
      }
    });
}
</code></pre>

<p>I have other places in the code where I need the parameter, but in this particular case I do not. But, the alert gives me a random integer value every 5 seconds. Shouldn't it always be undefined?</p>
