More specifically:
function callback(myData) {
document.getElementById('consoleBox').innerHTML += myData;
}
function getData(dataURI) {
var timer = setTimeout(function () { // simulated 3 second delay
var dataArray = [123, 456, 789, 012, 345, 678]; // faked data
callback(dataArray);
}, 3000);
}
getData('http://fakedomain1234.com/userlist');
document.getElementById('consoleBox').innerHTML += 'show this before data ...';