In the code given below, console message Data fetched successfully
is logged before the console message Data fetched for John
. Please rewrite the code using callback functions to ensure that the console message Data fetched successfully
is logged only after the console message Data fetched for John
is logged.