Practical Destructuring with Promises and Array Methods
ฝัง
- เผยแพร่เมื่อ 6 ก.ย. 2024
- This tutorial explains how you can use array and object destructuring in conjunction with Array methods and Promise-based methods like fetch.
Note: The rest operator must be the last argument when destructuring. The code sample linked to below has the correct syntax for doing this.
Code from video: gist.github.co...
This channel deserves more subscribers for its quality content
Actually, I am going to use them now!
Your videos are so easy to understand. Thank you so much!
Man's a genius....simply put
really like your tutorial !! even non-native English speaker still can understand , thank you~
Oh my, I found a home where JS is understood. Waiting for that video that will touch on JEST, hoping that it is being thought of. This video has made me go back and refactor my code. Thanks a lot.
You can make requests for tutorials in the comments here - th-cam.com/video/LCezax2uN3c/w-d-xo.html
@@SteveGriffith-Prof3ssorSt3v3 Thanks, will do.
Thank you so much our senior dev , this video worth my time ❤
Thank you.
Great sir. I m gonna use this. Thanks for the tutorial. Lots to learn from you.
Thank you Professor! :)
Thanks
great video!
Great tutorial! Thanks.
Hi Sir 😊
Thanks for this tutorial video. I have a request, please make a video teaching how to make an image slider using Javascript with autoplay 🙂. And one more thing, is there any css property for smoothing the text on the webpage becuase the text on my website is very distorted on the edges and it doesn't look nice.
Thanks 😊
I made this tutorial a few years ago on building a carrousel / image slider - th-cam.com/video/mEQl4mEex34/w-d-xo.html
and this about touch events
th-cam.com/video/ga_SLzsUdTY/w-d-xo.html
Please add any tutorial requests in the comments here - th-cam.com/video/LCezax2uN3c/w-d-xo.html
Thanks heaps for the great video, would it be possible to fold values from Promises using destructuring? I trying to compose multiple sync and async functions while keeping the runtime under 50ms (CF worker) but the new Promise creation with .then is killing performance.
It has to do with how JS deals with the event loop and tasks and microtasks.
th-cam.com/video/cCOL7MC4Pl0/w-d-xo.html - this should help you visualize it.
Excellent +++++++++++++++++
Thank you. When using destructuring, if I change the order of name and partner, will it still work?
For object destructuring you can use any order for the property names. For array destructuring it has to be in the numerical order.
@@SteveGriffith-Prof3ssorSt3v3 Tank you. That is magnificent.
At 7:55 what u have said is wrong, sir. Rest element must be last in a destructuring pattern.
Why would you use a map() method without returning anything though... 🙄
Because it was the input into the map function that was being discussed, not what the map method does or returns.