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...

ความคิดเห็น • 27

  • @jaganmohan9013
    @jaganmohan9013 3 ปีที่แล้ว +2

    This channel deserves more subscribers for its quality content

  • @allezzthepunk
    @allezzthepunk 3 ปีที่แล้ว +2

    Actually, I am going to use them now!

  • @RHILL-hb1hr
    @RHILL-hb1hr ปีที่แล้ว

    Your videos are so easy to understand. Thank you so much!

  • @haroldtitcomb
    @haroldtitcomb ปีที่แล้ว

    Man's a genius....simply put

  • @sinsin7843
    @sinsin7843 3 ปีที่แล้ว +1

    really like your tutorial !! even non-native English speaker still can understand , thank you~

  • @Self-taughtCoder
    @Self-taughtCoder 3 ปีที่แล้ว +1

    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.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  3 ปีที่แล้ว +2

      You can make requests for tutorials in the comments here - th-cam.com/video/LCezax2uN3c/w-d-xo.html

    • @Self-taughtCoder
      @Self-taughtCoder 3 ปีที่แล้ว +1

      @@SteveGriffith-Prof3ssorSt3v3 Thanks, will do.

  • @pamphilemkp5841
    @pamphilemkp5841 ปีที่แล้ว

    Thank you so much our senior dev , this video worth my time ❤

  • @dodokwak
    @dodokwak 3 ปีที่แล้ว +1

    Thank you.

  • @krish_unni
    @krish_unni 3 ปีที่แล้ว

    Great sir. I m gonna use this. Thanks for the tutorial. Lots to learn from you.

  • @2ru2pacFan
    @2ru2pacFan ปีที่แล้ว

    Thank you Professor! :)

  • @mubashirwaheed474
    @mubashirwaheed474 3 ปีที่แล้ว +1

    Thanks

  • @micahelm3222
    @micahelm3222 2 ปีที่แล้ว

    great video!

  • @mickwhyte4204
    @mickwhyte4204 3 ปีที่แล้ว

    Great tutorial! Thanks.

  • @hammadahmad5383
    @hammadahmad5383 3 ปีที่แล้ว +2

    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 😊

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  3 ปีที่แล้ว +1

      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

  • @cloudpuncher4615
    @cloudpuncher4615 3 ปีที่แล้ว +1

    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.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  3 ปีที่แล้ว

      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.

  • @mohamedyoussef8835
    @mohamedyoussef8835 2 ปีที่แล้ว

    Excellent +++++++++++++++++

  • @johmcg64
    @johmcg64 3 ปีที่แล้ว +1

    Thank you. When using destructuring, if I change the order of name and partner, will it still work?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  3 ปีที่แล้ว +2

      For object destructuring you can use any order for the property names. For array destructuring it has to be in the numerical order.

    • @johmcg64
      @johmcg64 3 ปีที่แล้ว +2

      @@SteveGriffith-Prof3ssorSt3v3 Tank you. That is magnificent.

  • @devT44
    @devT44 ปีที่แล้ว

    At 7:55 what u have said is wrong, sir. Rest element must be last in a destructuring pattern.

  • @yadusolparterre
    @yadusolparterre 3 ปีที่แล้ว +1

    Why would you use a map() method without returning anything though... 🙄

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  3 ปีที่แล้ว +2

      Because it was the input into the map function that was being discussed, not what the map method does or returns.