Here is my function
function two(){ console.log('two') } function one(callback){ setTimeout(()=>{ console.log('one') },2000) callback() } one(two) Actual output:
two one My expected Output:
one two My question is how to make changes to these functions so that function two() will be executed after function one()