Using the JavaScript Spread Operator

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024
  • ES6 gave us the spread operator which is represented by three dots (...). It can be very helpful in working with arrays in certain situations. In this tutorial we will look at several examples of how you can use the spread operator.
    For more resources on JavaScript:
    www.allthingsja...
    Full personalized courses on JavaScript:
    allthingsjavasc...
    Courses offered on Udemy: Getting Started or Advanced Topics at a huge discount:
    www.udemy.com/...
    www.udemy.com/...
    Tutorials referred to in this video:
    JavaScript Objects passed by reference or value?: • JavaScript Variables a...
    The Basics of Objects: • The Basics of JavaScri...

Комментарии • 25

  • @JohannY2
    @JohannY2 3 года назад +2

    I love how you explain things. And the length is just about right also.

  • @rajeshnaika7354
    @rajeshnaika7354 5 лет назад +2

    wooowwwww!!!!!!!!!!!!!!!!!!1 great videos of javascript, thanks for your work. love your channel

  • @automationgeek5439
    @automationgeek5439 5 лет назад +3

    Absolutely fantastic explanation Sir. All concepts of Spread cleared in a single video

  • @IszuddinIsmail
    @IszuddinIsmail 4 года назад +1

    Cool explanation. Thanks.

  • @dinchen_tamang684
    @dinchen_tamang684 6 лет назад +1

    Beautifully explained. Thanks

  • @100babaj
    @100babaj 5 лет назад +1

    thank you for the well thought out explanation

  • @mocococo2877
    @mocococo2877 2 года назад +2

    Hello and greetings from Bulgaria.
    I think there is a big confusion between Spread and Rest operators. I have not clarified them yet. So, is it possible that you last example is actually about Rest ?
    Thank you.

    • @AllThingsJavaScript
      @AllThingsJavaScript  2 года назад +2

      So I have a bad habit of calling it the spread operator no matter what it is doing, but you are correct that the last example would apply to the rest application. It is bringing values together. Thanks for pointing that out!

  • @frinto003
    @frinto003 4 года назад

    Thank you that was nice explanation

  • @shyarxelil1987
    @shyarxelil1987 6 лет назад +1

    Keep going with those great videos!

  • @armyofone2323
    @armyofone2323 5 лет назад

    a huge like for this man.

  • @JustLookA7
    @JustLookA7 6 лет назад

    I love this channel :) thanks for sharing your knowledge

  • @Rajeshkumar-jb9pf
    @Rajeshkumar-jb9pf 5 лет назад

    Awesome stuff.. Keep posting the videos..

  • @ruchirai5775
    @ruchirai5775 4 года назад

    Sir, Thank you.Nice explanation.

  • @ilhomhuja
    @ilhomhuja 6 лет назад

    great Teacher, thx lot

  • @nocturno7887
    @nocturno7887 4 года назад

    Excellent

  • @greggfineguitar
    @greggfineguitar 6 лет назад +3

    Using the spread operator as a parameter in a function turns it into the "rest operator".

    • @liyan542
      @liyan542 5 лет назад

      @turbohoodie Absolutely correct.

  • @lifeisniche
    @lifeisniche 3 года назад

    amazing 😇

  • @ChrisTian-ox5nr
    @ChrisTian-ox5nr 4 года назад

    🐐🐐🐐🐐🐐🐐🐐🙌🏼Thanks a ton!

  • @j.k.ravshanovich
    @j.k.ravshanovich 4 года назад +1

    Unfortunately, I can give you only one thumbs up for this video.

  • @liyan542
    @liyan542 4 года назад

    Can we clone an object using spread operator?
    const obj = {
    name: 'Steven'
    };
    const obj2 = { ... obj }

    • @AllThingsJavaScript
      @AllThingsJavaScript  4 года назад

      Yes, you can see an example of that as a part of the most recent tutorial I published: ruclips.net/video/rA6-Ai67eyY/видео.html

  • @Bugsy0987987
    @Bugsy0987987 3 года назад

    best