Trying to understand the concept when callbacks are passed as arguments
Hello guys, sorry to disturb you all; I didn't understand the importance of callbacks, like here in the following code, why use callbacks please... I'm learning about asynchronous javascript, promises and all these stuffs but I didn't understand the concept what we try to convey when we pass callback as arguments. I understand the syntax but not how they work or how we should think of them.... can someone elaborate why callback is important in the code below for e.g. and what if we don't have them and what therefore introduces the idea of promises please.
4 Replies
i believe u made a similar post before
and we talked through it
actually nvm it was about call back hell
yeahh, I'm still confuse though 😠like I've understood the syntax but I didn't understand why we need them and why we should use them
but ya there is a different post that goes through it
https://discord.com/channels/436251713830125568/1281260269175181323
check this
okkk