JS Spread Operator: How It Works & Why I Love It

Поделиться
HTML-код
  • Опубликовано: 29 ноя 2024

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

  • @swanand1161
    @swanand1161 5 лет назад +5

    Awesome video!
    One thing I would like to state which may be handy to anyone reading:
    When we have two different objects with the same “key” the new object overrides the key of the previous one.
    for example :
    const lion = {"big":"cat",legs: 4};
    const eagle = {"big":true, "type":"bird"};
    case 1:
    const someobj = {"name": "Swanand", ...lion, ...eagle};
    this will print
    someobj = {name: "Swanand", big: true, legs: 4, type: "bird"}
    case 2:
    const someobj2 = {"name": "Swanand", ...eagle, ...lion};
    this will print
    {name: "Swanand", big: "cat", type: "bird", legs: 4}

  • @yuhceeofficial
    @yuhceeofficial 5 лет назад +126

    I enjoy your videos, notes, humor, you, your pets, everything about you. Thanks for clarity in teaching and always simplifying concepts.

    • @ColtSteeleCode
      @ColtSteeleCode  5 лет назад +5

      Thanks Egbo, I really appreciate it. Let me know if there any topic you'd like to me cover!

    • @yuhceeofficial
      @yuhceeofficial 5 лет назад +8

      Thanks so much for replying me, i took your web developer course last year and it gave me a great perspective into understanding JavaScript and till date all i know and are in programming is all down to you. Your only courses i don't have now is the ones you're still working on. You're my hero and i sincerely want to grow and help people like you do someday.
      I am still learning but think that what will help me most now is ways to land my first job. If you can do anything along that line of how am going to go about it, I'd appreciate it so much. Algorithms scare the Shit out of me to even but am improving everything with your algorithm course. Thanks.

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

      @@ColtSteeleCode where can i get more notes like this

    • @nostalgiccringeallhailchel3881
      @nostalgiccringeallhailchel3881 Год назад +1

      It's called having a crush

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

    So it is the first time ever (since 2006) that I see a video on RUclips with over 1000 likes (and I was the 1000th!!) and zero dislikes. That really means something about you, Mr. Steele. You rock! Keep doing it.

  • @Mitsunee_
    @Mitsunee_ 5 лет назад +25

    as someone who constantly relies on MDN having additional notes/documentation on anything, especially if written by someone who knows what they are talking/writing about, is invaluable.

  • @thomjorke
    @thomjorke Год назад

    oh my goodness, I have done two full React courses and have always been so confused by the spread operator. Have watched many other videos and read documentation that did not click but your video really solidified it! THANK YOU

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

    Oh Lord you are the best. I bet no one ever has over the entire web explained to that detail the damn spread operator... Thanks a lot, you made my day!! job well executed!!

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

    I don't know why someone disliked this (2 people)? This is a great explanation and comes with the blog post to reference later. Obviously Colt put time and effort in this for others to understand this concept. I really like that you have the notes for me to reference later on. I will reference your video on my blog. Thank you for the nice video.

  • @lalosalamanca1208
    @lalosalamanca1208 3 года назад +1

    The "Spread Eagle" reference had me rolling. Great video. Very informative! Thanks again for all you do for the coding community!

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

    I don't understand too much when anyone speaks in English but you are very clear. Thank you for the explanation!

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

    A video without dislikes on youtube. This shows how much we needed it. Thanks Colt

  • @harrazmasri2805
    @harrazmasri2805 2 года назад

    i was stunned the first time i saw this before a competition, took me months more to fully grace everything

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

    I was having a hard time understanding spread from the MDN documentation so I looked for a video explaining it. This one wasn't the first on the list but it looked like it was the highest quality one on the first page so I clicked it and I'm really glad I did! This video was great and I feel like I understand spreads very well after just one watch!

  • @skepticacid-io
    @skepticacid-io 4 года назад +6

    Gosh, this is so thorough and well-paced. The only explanation I needed. Thanks Colt!

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

    Just want to say, this is an awesome tutorial with a ton of effort behind it. Well done!

  • @DavidVCastro
    @DavidVCastro 2 года назад

    I saw the spread operator being used in Maximillian Schwartzmuller's Ionic Udemy course, and tried to read an explanation of it. That wasn't working, so I found your video, and you cleared it right up for me! Thank you!

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

    Thank you for this informative video. As a new programmer currently drinking from a firehouse in a boot camp, I found this very helpful.

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

    Colt Steel is synonim of clarity, professionalism and solid knowledge which is passed on in the most gracious way! Thank you for all you do and for your notes, they are brilliant!

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

    You are easily the best online teacher out there.

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

    I think you are the best one who explained the spread operator, Thank you so much for this tutorial

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

    Grateful for the video, and appreciate the notes, too. The MDN explanations are often dense and inscrutable, and I'm glad you take the time to deconstruct the definitions and explain them in ways I grasp rapidly. Completed your Web Developer Bootcamp course and was amazed at how well you explained and demonstrated everything. Next up: the Advanced course! Thanks for all of it, Colt!

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

    Very helpful. I've tried to learn spread a few times, but I think this will still now, thanks.

  • @AndresMenaSimba
    @AndresMenaSimba 5 лет назад +7

    Please keep making videos like this. Extremely helpful.

  • @GroovyVHS
    @GroovyVHS 3 месяца назад

    This is still very helpful years later. Thank you for explaining!

  • @armaanpathan1856
    @armaanpathan1856 4 года назад +2

    Hey Colt, just getting addicted to your teaching dude !! Thank you for the amazing contents you create for us .

  • @DUANEYAISER
    @DUANEYAISER 5 лет назад +9

    Thank you! Just an hour ago, I was using your boot camp lessons to add flash to my own project. :-)

  • @magdasok-f2i
    @magdasok-f2i 3 года назад

    the best explanation of spread operator I've seen. Thanks for the great content

  • @andreirobert18
    @andreirobert18 Год назад

    You are the best teacher there is! Thanks for making my life better!

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

    Not only do I love Notion, but the notes are very helpful

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

      I'm obsessed with Notion! Love that it supports code syntax highlighting and embedded gists. I wish I was on the Notion dev team :)

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

    Quite frankly, I only used the notes from your regex video and to my mind such cheat sheets turn out to be super useful. If you don’t feel like spending time preparing these notes, it’s absolutely fine - I think we will manage without them, however, as I mentioned, with topics such as regular expressions where there is quite a lot of new ideas to learn - they really come in handy.

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

    10:48 Take a bow! You nailed it. Thank you for sharing...

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

      or smoke a bowl! You earned it! 420 blaze it brooooooo :)

  • @kentaasakura8230
    @kentaasakura8230 Год назад

    First time watching one of your tutorials, and I found your tutorial easy to understand. Thank you for contributing in the developer society 🙏

  • @growthascendant4689
    @growthascendant4689 2 года назад

    Delightfully informative is how I describe your teaching style. I'm learning a lot and I'm laughing a lot. Great stuff. 💯

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

    you are one of my best teachers in web development. I would love to see more of your teachings on youTube. I have most of your Udemy courses

  • @riyadhossain1706
    @riyadhossain1706 2 года назад

    the notes are really helpful, please don't stop making notes. Thank You

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

    I haven't seen anyone explain this as well as you have. Great job!

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

    Nice! After 5 minutes watching everything got much more clear. Thank you!

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

    You should communicate with the community more often through Q&As, WDB Facebook page, and whatnot. You seem like a celebrity who pops up once in a while where we just communicate to your TAs. Would love to ask the Big Cheese some questions and whatnot.

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

    Your videos are great! Keep up! I like that you show how well-rounded you are by mentioning art and TV-shows!

  • @mohamadomran13
    @mohamadomran13 5 лет назад +10

    Great job dude! p.s: the notes are really helpful, so please don't ditch them :P

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

    Hi Colt, always grateful for your videos, I would not use the notes personally, I would rather have a visual and audible explanation like you have done here on youtube. Many thanks for all the effort and time you put into your work.

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

    definitely one of your best videos colt. great explanation with good examples and good pacing.

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

    I was laughing at your speed reading of the MDN definition.
    That is exactly how I felt when I went to read about spread syntax initially lol

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

    Nice explanation, i'm from Paraguay, my english is bad, but i can understand you 80%
    New sub, great content

  • @randallfine7934
    @randallfine7934 5 лет назад +15

    Great video. I lost it at spread-eagle 🤣

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

    Thank you for this video. Helped me grasp why two inputs using the same useState need a spread op ... for the onChange event in the setState(...state, e.target.value). Going to have to go back and see if you cover it in your React Course. Thank you again!!

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

    I subscribed partially because you said "... do all of that annoying stuff". I like the realism: good video.

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

    colt you have saved my miserable life,thank you from the bottom of my heart!

  • @duuhhveeed
    @duuhhveeed 5 лет назад +8

    I’m working on a react final project for a boot camp and this gave me some really good pointers, concise as always Colt!!

    •  4 года назад

      Can i ask you which bootcamp you are in ? and are you happy with the education they gave?

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

      I went to a trilogy camp at UT Austin and it was pretty good I learned more then I would have on my own but they need to work on prices cause it was pricey being also the cheapest at 12k. I got a job 2 mo afterwards it’s not big pay but a start. I suggest going in with some knowledge prior. Hope this helps!

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

    Thanks for the video, it simplified the spread operator concept a great deal for me and I really appreciate your thorough notes.

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

    I still don't understand the function shown at the beginning, but the bit about not wanting to mutate the state really helped me understand why people are always talking about state.

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

    Fantastic. Wonderfully easy to understand explanation and delivery. Top man.

  • @robertjohnstevens
    @robertjohnstevens Год назад

    Excellent explanation of the Javascript spread operator. Thank you very much!!!

  • @RahulSharma-oe6fy
    @RahulSharma-oe6fy 2 года назад

    Thanks Colt! It's one of the most extensive video on the topic. Helped me a lot!

    • @RahulSharma-oe6fy
      @RahulSharma-oe6fy 2 года назад

      I have bought the react course too from Udemy . Can you update it to the latest version ? Facing some issues with projects

  • @Nicole-cs2vz
    @Nicole-cs2vz 3 года назад

    This was an excellent explanation. I needed something to supplement the es6 lessons on freeCodeCamp, and this video did the trick!

  • @damin1916
    @damin1916 2 года назад

    I love that you use a lot of examples, really helped a lot!!!!

  • @warlock257
    @warlock257 5 лет назад +8

    This greatly clarifies an unknown I've had in my head for months.

  • @bits_of_bryce
    @bits_of_bryce 5 лет назад +4

    Colt you are incredible. Honestly, I wouldn't use the notes over quickly searching for an example.

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

    Your notes are super useful, please keep writing them.

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

    Thank you, very complete guide and even managed to help me understand react, which I am studying right now

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

    Thumbs up just after 1min due to the notion notes. Love the idea!

  • @alexroy4235
    @alexroy4235 Год назад

    Data Structure course on Udemy made by Mr Colt is amazing. the way of explanation is wow

  • @balajeemishra
    @balajeemishra 2 года назад

    This video is one of the best video I found on RUclips.. Please make this type of videos.😊

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

    Thanks for this i've been learning react lately and this just clarified a lot

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

    This solves a lot of problems for me. Thank you!

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

    Thanks - this is great information! YES, the notes are very helpful - keep up the good work!

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

    Love your videos and teaching! I am taking your js course. Looking forward to your react course. I appreciate your notes! Thank you for all your hard work!

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

    thank you, its always nice to have the notes part for reference

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

    Hey Colt! :)
    Just letting you know that your explanations are super clear! Thanks for that.
    Also, the Notions notes ARE SUPER USEFUL! I can attach them to my own Notion that I'm building about JS so I have quick access to them, I know they should take time, but if you can keep doing them in your videos would be GREAT !!
    Thanks again :)

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

    Colt you're the best! Do you think you could explain how sets work and what their uses are? Thanks

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

      I'll have that video out next Tuesday! Let me know if you have any other requests!

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

      @@ColtSteeleCode please make video on React infinite scroll

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

    Great videos, liked the important and covered all most all aspect of spread operator. Hoping for more such videos in future.

  • @chips-n-salsa
    @chips-n-salsa 2 года назад

    thank you for this video. spread operator makes a lot of sense now

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

    Coming directly from your react bootcamp to have more understanding of spread operator and notes helps(actually saved it as well ^_^)

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

    The notes are great. They are very useful. Thanks for all of your content.

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

    the first example is amazing. thank you.

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

    I am going to be honest with you (again) but subscribing to your channel is not annoying and it’s nice... 👍Also to like the video we enjoy is truly amazing because then RUclips algorithm will give us more of what we like !!! So please keep up with your great work... And you have almost only nice comments or interesting questions so encouraging people to interact with the video is something positive also at the moment of writing this your half way to the 100K play button !!! And I hope you will be getting it soon so make them subscribe my friend !!!

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

      Got got a notification on my phone for your comment but I could only see the "I am going to be honest with you..." I was bracing for a harsh comment, so reading this was a pleasant surprise! Thanks for the kind words. Hoping to get to 100k by 2020!

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

    you cleared up all the confusion in my brain, great explantation tahnk you!

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

    Seriously i love this kind video :) i always have problem with this operator especially in react...thanks a lot. Really nice video when u can simplify that common confusion :)

  • @0xMaw
    @0xMaw 3 года назад

    Borderlands references in a JS video, that was unexpected. Nice one!

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

    Dude you are awesome, please keep the notes!

  • @milenamilosevic3739
    @milenamilosevic3739 3 года назад +1

    I was wondering what happens when we spread objects with the same property names: the properties gets completely overwritten by the last object's property value.

  • @Leanz
    @Leanz 5 лет назад +5

    great video colt ! Notes are useful, but I think I could live without them if that meant you posted more :D. PLS post more 💜

    • @ColtSteeleCode
      @ColtSteeleCode  5 лет назад +5

      Working on it! I posted 2 videos this week!! It's hard to prioritize when I'm teaching in person and trying to make more Udemy courses, but I'm trying to put out at least 1 video a week for the next couple months.

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

    Please make video on React infinite scroll.
    Thanks for all of your work❤️❤️

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

    Thank you for that great explanation and the use case in reactjs. I think the notes are also very useful. Especially after watching your video. Great work!

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

    Keep them notes coming! Helping me a lot.

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

    Thank you! The notes are great, way better than MDN

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

    Your Notes are awesome................ keep helping us......

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

    Best spread operator tutorial ever! Thanks for sharing your knowledge in a simple and easy to understand way. =)

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

    Simply an awesome video :)) Lots of new useful information delivered in a concise and entertaining way.

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

    Really love your courses and videos Colt! Also i find the notes very helpful, please keep making them.

  • @carolinazamora9004
    @carolinazamora9004 2 года назад

    I understood this thanks to you, thank you for being so clear and thorough !

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

    bro you are really good at this keep it up, it is helping me loads!

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

    Great video and notes! Is there a central location with links to all of your notes?

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

    Thanks, Colt! Very useful.

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

    Notes are VERY useful and much appreciated.

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

    Really helpful video and the use cases made it more clear. I did start to veer off at 11'13'' at the React discussion. Anyways, thank you.

  • @roshanbhusal2505
    @roshanbhusal2505 3 года назад +1

    I was so confused, this helped a lot.

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

    Keep the notes, they are as valuable as the videos!

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

    hey Colt. I love the Notion notes. Thanks for awesome video

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

    Thanks Colt, beautiful and dead easy to understand&implement explanation!

  • @HabiburRahman-xs9gb
    @HabiburRahman-xs9gb Год назад

    Best tutorial on this topic. absolutely best