Hey everyone!
I’m taking on the #100DayCodeChallenge!
Over the next 100 days, I’ll be sharing my journey, knowledge, and experiences.
Stay tuned for regular updates!
3 Likes
Day 1:
Today I learned about “Promises” in JS.
Definitions :
- Promises : A way to handle asynchronous operations. ( put simply: They represent a value that might be available now, in the future, or never. ) => formally noted as pending, fulfilled, or rejected.
- Asynchronous operations : Allow a task to start, continue doing other things, and then finish later. They don’t block or stop the program from running other code in the meantime.
Initializing a Promise :
- using const : const = constant. Use const when you know you won’t change the promise.
- using let : let = let this variable change if needed. Use let when you think you might need to change the promise to something else.
3 Likes
system
(system)
Closed
4
This topic was automatically closed after 180 days. New replies are no longer allowed.