setTimeout on Asynchronous function
<p>I have a asynchronous function that I want to have a 5000ms delay before being fired. I am trying to use <code>setTimeout()</code> to achieve this. This async function occurs in a loop that runs several times, with the async function being passed different data each time, thus <code>setInterval()</code> cannot be used here.</p>

<p><strong>Problem:</strong> The async function gets triggered instantly without delay (console prints 5 <code>Done</code> messages instantly` and loops without any delay. What happened, and how can I solve it?</p>

<p><strong>Javascript Code</strong></p>

<pre><code>someFunction(listings, function() {
    for (var i in listings ) {
        var listing = listings[i];
        setTimeout(asyncFunction(listing, function(data) {
            console.log('Done');
        }), 5000);
    }
});
</code></pre>
