Nader, you are doing an outstandingly good job explaining with clarity and structure. Thanks for the great content, I instantly subscribed. :) One advice for improvement that is not code related: Try to mount an external webcam on a stand that is not affected by your hand/body movement. When watching you talk on fullscreen, the little shakes make the viewer dizzy really quickly. I can only speak for myself of course. :)
Both the plain vanilla promises and async/await have pros and cons. The best way is for us to get the foundations down on both in order for us to be aware when or when not to use this or the other. I guess async/await is becoming more popular since it is cleaner, I guess? And is easier to handle such errors that may come along with a simple try catch wrapper instead of chaining multiple .then function. I suppose promises are older, so they still been used on many programs so compatibility is one thing. I believe by learning more about these two and kinda wrap the cons and pros will give us the best possible way on how to work on our code. Further, I suppose we can also combine them whatever is appropriate, MDN and Google is always there to further search on these advance topics, but I am super glad of this lecture.
I appreciate these in depth, man. You planned and paced them out very well! Can't wait for project. I would love in depth nodeJS/ express as well. Have you thought about front end framework indepth yet? React/Vue would be great videos to cover.
Thanks! I have pretty much all you described planned, haha! Will be going a bit deeper in to some JS, then I’ll bring in some front end/browser topics before moving to full stack and backend topics like APIs and databases etc. Too many topics, too little time! 😄
5:18 apart from this I think you Callback Functions has never been mentioned in this series, I noticed in NPM video you had Angular package installed, are you planning to make series for Angular 18-19 as well? Thanks @TechWithNader
Hey Bijay, thanks for the kind words! I 100% agree and that’s the plan when we learn a few more concepts that will allow us to work with real life data (like promises and some other newer js syntax). Can’t wait to do those - already have lots of fun ideas! 🥳
Nader this was amazing holyyy!!! learned so much thank you for the great content. I did some tinkering and got the .catch to work on the await so that a try/catch wasn't needed. const result = await makeTimeout(3000).catch((rejector) => { return rejector; }); console.log(result); I know you said we don't have a way to catch errors with async/await other than the way you showed. Why does this work, is it a bug or very unstable or something?
Great question! in this case, makeTimeout will return a promise and since it's a promise, we can still use .catch on it. So you can think of this basically doing this: makeTimeout(3000).then((result) => console.log(result)).catch((rejector) => rejector); Hope that helps :)
Hi Nader, I learned a lot from your video tutorials, easy to understand. Can you please make a video about DOM Structure? new subscriber here. Thank you...
Thanks a lot! Right after we look at Classes and OOP we'll wrap up the Javascript In Depth series and move right to the DOM In Depth 😊 (then React after)
I noticed if u had a console.log before the console.error inside of the catch, try { console.log('sup sis') const result = await makeTimeout(2000) console.log(result) console.log('nah jk') } catch (error) { console.log('sup bro"); console.error(error) } and you had code outside console.log('start') causeError(); console.log('end') the output would differ from the resolved-try block because the order of outputs are different. // the log order start finish sup dude there was an error! the sup dude and error log comes after start and finish but in the case of the try block and resolved promise the order looks like //the log order start sup sis finish All done nah jk my question is why doesn't 'sup dude' log before 'finish' in the catch block, like 'sup sis' logs before 'finish' in the try block?
Hands down the best content about this topic on TH-cam. Super clear!
Thanks! That’s quite the statement haha! 😊 It’s a tricky but centra concept to JS so I’m glad I can help make it clearer for the community 🥳
I haven't started watching it yet but my guts tells me it is gonna be helpfull.
Nader, you are doing an outstandingly good job explaining with clarity and structure. Thanks for the great content, I instantly subscribed. :)
One advice for improvement that is not code related:
Try to mount an external webcam on a stand that is not affected by your hand/body movement. When watching you talk on fullscreen, the little shakes make the viewer dizzy really quickly. I can only speak for myself of course. :)
Both the plain vanilla promises and async/await have pros and cons. The best way is for us to get the foundations down on both in order for us to be aware when or when not to use this or the other. I guess async/await is becoming more popular since it is cleaner, I guess? And is easier to handle such errors that may come along with a simple try catch wrapper instead of chaining multiple .then function. I suppose promises are older, so they still been used on many programs so compatibility is one thing. I believe by learning more about these two and kinda wrap the cons and pros will give us the best possible way on how to work on our code. Further, I suppose we can also combine them whatever is appropriate, MDN and Google is always there to further search on these advance topics, but I am super glad of this lecture.
Learning new stuff in the language feels great
watching your playlist. Better than Udemy BS courses.
I appreciate these in depth, man. You planned and paced them out very well!
Can't wait for project. I would love in depth nodeJS/ express as well.
Have you thought about front end framework indepth yet? React/Vue would be great videos to cover.
Thanks! I have pretty much all you described planned, haha! Will be going a bit deeper in to some JS, then I’ll bring in some front end/browser topics before moving to full stack and backend topics like APIs and databases etc. Too many topics, too little time! 😄
Great content! You break down complicated concepts in such a clear and understandable way! You're a fantastic teacher! Awesome! :)
5:18 apart from this I think you Callback Functions has never been mentioned in this series, I noticed in NPM video you had Angular package installed, are you planning to make series for Angular 18-19 as well? Thanks @TechWithNader
Well done!! God Nader, thanks for this nice explanation!
Thanks again, Kin! 🥳
Thank you!
You should do more exercises on projects which could be based on real life projects ! Anyway amazing video❣❣❣ Love from Nepal
Hey Bijay, thanks for the kind words! I 100% agree and that’s the plan when we learn a few more concepts that will allow us to work with real life data (like promises and some other newer js syntax). Can’t wait to do those - already have lots of fun ideas! 🥳
Nader this was amazing holyyy!!! learned so much thank you for the great content.
I did some tinkering and got the .catch to work on the await so that a try/catch wasn't needed.
const result = await makeTimeout(3000).catch((rejector) => {
return rejector;
});
console.log(result);
I know you said we don't have a way to catch errors with async/await other than the way you showed. Why does this work, is it a bug or very unstable or something?
Great question! in this case, makeTimeout will return a promise and since it's a promise, we can still use .catch on it. So you can think of this basically doing this:
makeTimeout(3000).then((result) => console.log(result)).catch((rejector) => rejector);
Hope that helps :)
@@TechWithNader ahh okay I see so it acts as a normal promise.
Honestly, I prefer the vanilla Promise syntax so far. I hope that changes on the exercises section
Haha, let us know if that thought changes after you try these 😂
@@TechWithNader After exercise 3, I've got to see what a "callback hell" looks like.
Glad I'm getting used to the async/await syntax 🙂
@@randerins 😂🥳
nice one
Hi Nader, I learned a lot from your video tutorials, easy to understand. Can you please make a video about DOM Structure? new subscriber here. Thank you...
Thanks a lot! Right after we look at Classes and OOP we'll wrap up the Javascript In Depth series and move right to the DOM In Depth 😊 (then React after)
understandable super 👍Thanks!
Thanks Paljinder! You’re very welcome - glad it was helpful 😊
You super master
I noticed if u had a console.log before the console.error inside of the catch,
try {
console.log('sup sis')
const result = await makeTimeout(2000)
console.log(result)
console.log('nah jk')
} catch (error) {
console.log('sup bro");
console.error(error)
}
and you had code outside
console.log('start')
causeError();
console.log('end')
the output would differ from the resolved-try block because the order of outputs are different.
// the log order
start
finish
sup dude
there was an error!
the sup dude and error log comes after start and finish
but in the case of the try block and resolved promise the order looks like
//the log order
start
sup sis
finish
All done
nah jk
my question is why doesn't 'sup dude' log before 'finish' in the catch block, like 'sup sis' logs before 'finish' in the try block?