Execute dynamic number of ajax request sequentially
<p>Have the following scenario :</p>

<p>I have to display the graphs for a given interval (startDate,endDate)</p>

<p>Because the interval might be quite big , the data is retrieved per day so I need
to  do multiple ajax calls sequentially and to append the data to the graph(highcharts)</p>

<p><strong>Example interval is n days ==></strong></p>

<pre><code>ajax request day 1 

when is (done) ready ajax request day 2

when is (done) ready ajax request day 3

....

ajax request day n
</code></pre>

<p>I read about deferred and promises BUT I found difficult to with dynamic number of days and the requirement to get the responses sequentially</p>

<p>Thanks</p>