hey its me shivam
todays topic of blog is callback and promise
so lets start without wasting any time lets move to actual work
soooo the story starts from two things
async operation
sync operation
before understanding callback and promise we first need to understand why async programming even exist
because if u directly jump into promise and callback then trust me u will memorize it
not understand it 😭
Sync Operation
so in this the code run line by line yes this is the simplest explanation of sync operation
for example
console . log ( " Start " );
console . log ( " Task 1 " );
console . log ( " Task 2 " );
console .…