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

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

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

  • @swanand1161
    @swanand1161 4 ปีที่แล้ว +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

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

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

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

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

  • @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

  • @ts3798
    @ts3798 5 ปีที่แล้ว

    You are easily the best online teacher out there.

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

    So it is the first time ever (since 2006) that I see a video on TH-cam 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.

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

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

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

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

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

  • @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!!

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

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

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

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

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

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

  • @lalosalamanca1208
    @lalosalamanca1208 2 ปีที่แล้ว +1

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

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

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

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

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

  • @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 :)

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

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

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

  • @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. 💯

  • @skepticacid-io
    @skepticacid-io 4 ปีที่แล้ว +6

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

  • @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!

  • @AndresMenaSimba
    @AndresMenaSimba 5 ปีที่แล้ว +7

    Please keep making videos like this. Extremely helpful.

  • @DUANEYAISER
    @DUANEYAISER 5 ปีที่แล้ว +9

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

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

  • @ga7853
    @ga7853 5 ปีที่แล้ว +1

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

  • @warlock257
    @warlock257 4 ปีที่แล้ว +8

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

  • @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!

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

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

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

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

  • @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!

  • @armaanpathan1856
    @armaanpathan1856 4 ปีที่แล้ว +2

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

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

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

  • @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 TH-cam 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!

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

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

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

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

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

    Your notes are super useful, please keep writing them.

  • @RaajKanchan
    @RaajKanchan 4 ปีที่แล้ว +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 :)

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

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

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

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

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

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

  • @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 🙏

  • @chips-n-salsa
    @chips-n-salsa 2 ปีที่แล้ว

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

  • @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!

  • @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

  • @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

  • @sexyeur
    @sexyeur 5 ปีที่แล้ว

    Can also inexpensively _gift_ Colt's exhaustive self-paced course to someone you know... _Highly_ recommended.

  • @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!

  • @joshualawson7604
    @joshualawson7604 5 ปีที่แล้ว

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

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

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

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

    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

  • @randallfine7934
    @randallfine7934 5 ปีที่แล้ว +15

    Great video. I lost it at spread-eagle 🤣

  • @christinavoudouris
    @christinavoudouris 5 ปีที่แล้ว +1

    Thank you Colt - fantastic video! Great balance of showing practical examples and explaining the "why" behind everything. I bookmarked your notes too :)

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

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

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

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

  • @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 :)

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

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

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

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

  • @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!

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

    I was so confused, this helped a lot.

  • @panagiotiszig6228
    @panagiotiszig6228 5 ปีที่แล้ว

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

  • @mohamadomran13
    @mohamadomran13 5 ปีที่แล้ว +10

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

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

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

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

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

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

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

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

  • @bripowered
    @bripowered 5 ปีที่แล้ว +1

    Thanks, Colt! Very useful.

  • @bobbydonchev2217
    @bobbydonchev2217 5 ปีที่แล้ว +1

    Dude you are awesome, please keep the notes!

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

    Keep them notes coming! Helping me a lot.

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

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

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

  • @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!!

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

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

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

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

  • @saileshthapa5970
    @saileshthapa5970 5 ปีที่แล้ว

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

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

    short, simple and beautiful

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

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

  • @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!

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

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

  • @Thomas-lu6tc
    @Thomas-lu6tc 4 ปีที่แล้ว

    Thanks a lot, I was confused for a long time by this, now I'm not. It was clear and short.

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

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

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

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

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

    Notes are VERY useful and much appreciated.

  • @0xMaw
    @0xMaw 3 ปีที่แล้ว

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

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

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

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

    Thank you. Very clearly explained the spread operator.

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

  • @HabiburRahman-xs9gb
    @HabiburRahman-xs9gb ปีที่แล้ว

    Best tutorial on this topic. absolutely best

  • @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 :)

  • @russaanderson
    @russaanderson 5 ปีที่แล้ว +3

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

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

    the first video i've seen with over 1.2k thumbs up and no thumbs down....

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

    Your notes are very helpful. Thanks for the video!

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

    I liked the way you explain about everything. Please add advanced react projects. Tnx lot

  • @firstworldproblems5477
    @firstworldproblems5477 5 ปีที่แล้ว +1

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

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

    Hey man, thanks for your notes and video! greetings from Venezuela.