logger.info('msg1'); // this gets logged 1st
someAsyncFunc(function(){ // callback
l
});
logger.info('msg2'); //this gets logged 2ndas @Peter Ferak pointed, it depends on your code, you should read the basics about JavaScript and Asynchronous vs synchronous execution.
console.log('calling some async function');
setTimeout(function(){
console.log('Async function 1 finished');
},4);
console.log('calling some async function 2');
setTimeout(function(){
console.log('Async function 2 finished');
},2);