JavaScript Question: What is Destructuring?

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ธ.ค. 2024

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

  • @GoldenEmperor5Manifest
    @GoldenEmperor5Manifest 8 หลายเดือนก่อน

    I can't tell you how much your channel is needed.

  • @fernandosalas4885
    @fernandosalas4885 4 ปีที่แล้ว +6

    Without a doubt the JS channel . Thank you so much Sir.

  • @joyride9353
    @joyride9353 4 ปีที่แล้ว

    "You'll run into it and wonder - what is this code doing."
    Read my mind. I always point people here when they want to level up their javascript. Thank you again for the high quality lessons.

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

    Man i just found your channel and i love it. So much to look at dont know where to start

  • @robertoa7257
    @robertoa7257 4 ปีที่แล้ว

    The best and simple explanation for destructuring.

  • @Working800
    @Working800 4 ปีที่แล้ว

    Your channel was one of the best things I found out to learn more about JS just like other but focus on C# both focus and the why and how something works and thanks to that I was able to complete some exercises, thanks.

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

    Amazing. Learning a lot of from this channel. Thank you SIR.

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

    Great explanation thank you.

  • @chamnil8666
    @chamnil8666 4 ปีที่แล้ว

    Thank you SIR,for making these videos

  • @isrealsixojeifo4517
    @isrealsixojeifo4517 4 ปีที่แล้ว

    Nice job Steven 👍; I think you forgot to add, renaming a a destructured property...
    let info = {
    workAddressofJohn: "1414 bekker street"
    }
    function getAddress({ workAddressOfJohn: address }) {
    return address;
    }
    From the above, we changed the destructured variable name to 'address' and so refer to it as address instead of the former long name.............
    Thumbs up fellow programmers 💪🏼

    • @AllThingsJavaScript
      @AllThingsJavaScript  4 ปีที่แล้ว +1

      Yes, thanks for adding that. There are also some nice things you can do with spread/rest when destructuring.

    • @isrealsixojeifo4517
      @isrealsixojeifo4517 4 ปีที่แล้ว

      🙂🙂🙂

  • @rob9709
    @rob9709 4 ปีที่แล้ว

    Excellent ! Thanks

  • @Hakeem-rk4ns
    @Hakeem-rk4ns 4 ปีที่แล้ว

    You are the best ❤❤

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

    Can you still use destructuring if the key to the key:value pair is in quotes, like a string?
    "name": "Steven"

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

      Sure:
      const obj = {
      "name": "Steven"
      };
      let {name} = obj;

  • @westfield90
    @westfield90 4 ปีที่แล้ว

    I watch so many videos and yet none seem to explain concepts as well as you do

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

    I am new. Why is it necessary to destructure the arguments, when they can be passed as simple arguments?

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

      Destructuring is a new feature that makes certain tasks easier. So you could do as you say, but not as easy.

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

    Great tutorial, thank you