i am beginner to JS , i am stumbling upon Promises and stuff , does any know a comprehensive course on that ?
No course will make you good but practice and applying them in real life projects. though you can use a few good courses as base/supplement.
If you want to understand Promises - You need to understand these topics and build small code snippets/project and practice. I'm listing out them below -
You need to understand why something is there at first place. I'd suggest you to check on these APIs before you even jump into more nitty gritty stuffs.
Step 1:
0 - Start with timer functions inside of JavaScript: setTimeout(), setInterval()
1 - XHR API and how to use it to make an API call
2 - Know a bit about JSON, Http (Headers and Status Codes) and Web Services (Especially REST APIs)
3 - Know a bit about SOP (same origin policies) and CORS (cross origin resource sharing)
4 - Check on Fetch API and how it works: basic examples, then, catch, finally and just know about method signatures
5 - Check on Open source APIs you can use (search "Postman Open source APIS" or "Open source free APIs" and use it with XHR and Fetch APIs
Step 2:
1 - How browser runs the code?
2 - Process & Thread ?
3 - Sync & Async ?
4 - Blocking & Non-blocking ?
5 - Basics of Queue, Stacks & Heaps ?
6 - Event Loop, Macro Task, Micro Tasks, Micro task queue, Macro task queue ?
7 - Know a bit more about setTimout, setInterval , xhr and fetch APIs, other Asynchronous DOM APIs
8 - Understand how callbacks can be used to solve situations when the value that's supposed to be evaluated may take some time, Learn Error and success handling
9 - Understand demerits of Callbacks (Callback hell, inversion control and unmaintainable code)
10 - Promise as replacement of Callbacks for API which is based on Promise (eg: Fetch)
11 - Understand Methods available on Promise (6 methods) and how to use them, Promisification, Error and success handling
12 - Demerits of Promise and Evolution of Async/Await model to have more readability to your code.
13 - Learn about Async Functions, Await statement, Learn how you'll handle common day to day Async operations using this.
14 - Generators as new model to pause on operation that might take some time and respond with success/failure after some time, Learn a bit about Iterator too
15 - Do examples on how you'd use it to handle async code, understand merits, demerits etc
16 - Intermediate topics you may try to learn or just check basics: Workers and creating separate threads for heavy computing operations, limitations and options.Observables and third party libraries to handle async operations inside of JavaScript.
Hope it helps.