+ 2
why we use promise in js
why we use promise in js
3 Réponses
+ 3
Search on google. There are many websites about this.
https://code.sololearn.com/W0uW3Wks8UBk/?ref=app
+ 3
Maybe this webpage helps you.
https://www.toolsqa.com/javascript/promises-in-javascript/#:~:text=Promises%20can%20handle%20the%20asynchronous,due%20to%20nested%20callback%20functions.
+ 1
Because Javascript is single-threaded and we want our page to still function even though we are downloading stuff or making api calls.