JS Spread Operator: How It Works & Why I Love It
Vložit
- čas přidán 22. 07. 2024
- In this video I talk about one of my favorite ES2015 features: the spread operator. We discuss the three main use cases for spread, as well as how spread relates to immutability and tools like React.
Find the Notes Here: www.notion.so/The-Spread-Oper...
Coupon For My React Course: www.udemy.com/modern-react-bo...
If you're ready to launch your career as a software engineer, check out my job-guaranteed bootcamp with Springboard: springboard.com/workshops/sof... - Věda a technologie
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}
I enjoy your videos, notes, humor, you, your pets, everything about you. Thanks for clarity in teaching and always simplifying concepts.
Thanks Egbo, I really appreciate it. Let me know if there any topic you'd like to me cover!
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.
@@ColtSteeleCode where can i get more notes like this
It's called having a crush
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.
So it is the first time ever (since 2006) that I see a video on CZcams 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.
I don't understand too much when anyone speaks in English but you are very clear. Thank you for the explanation!
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!
Gosh, this is so thorough and well-paced. The only explanation I needed. Thanks Colt!
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!
Just want to say, this is an awesome tutorial with a ton of effort behind it. Well done!
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!
The "Spread Eagle" reference had me rolling. Great video. Very informative! Thanks again for all you do for the coding community!
Thank you Colt - fantastic video! Great balance of showing practical examples and explaining the "why" behind everything. I bookmarked your notes too :)
Hey Colt, just getting addicted to your teaching dude !! Thank you for the amazing contents you create for us .
Your videos are great! Keep up! I like that you show how well-rounded you are by mentioning art and TV-shows!
i was stunned the first time i saw this before a competition, took me months more to fully grace everything
I think you are the best one who explained the spread operator, Thank you so much for this tutorial
the best explanation of spread operator I've seen. Thanks for the great content
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!!
the notes are really helpful, please don't stop making notes. Thank You
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
Thank you for this informative video. As a new programmer currently drinking from a firehouse in a boot camp, I found this very helpful.
Thank you! Just an hour ago, I was using your boot camp lessons to add flash to my own project. :-)
Delightfully informative is how I describe your teaching style. I'm learning a lot and I'm laughing a lot. Great stuff. 💯
A video without dislikes on youtube. This shows how much we needed it. Thanks Colt
You are easily the best online teacher out there.
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!
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!
Really love your courses and videos Colt! Also i find the notes very helpful, please keep making them.
First time watching one of your tutorials, and I found your tutorial easy to understand. Thank you for contributing in the developer society 🙏
Thanks for the video, it simplified the spread operator concept a great deal for me and I really appreciate your thorough notes.
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
I haven't seen anyone explain this as well as you have. Great job!
You are the best teacher there is! Thanks for making my life better!
Your notes are super useful, please keep writing them.
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.
Thank you, very complete guide and even managed to help me understand react, which I am studying right now
Fantastic. Wonderfully easy to understand explanation and delivery. Top man.
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
definitely one of your best videos colt. great explanation with good examples and good pacing.
This was an excellent explanation. I needed something to supplement the es6 lessons on freeCodeCamp, and this video did the trick!
I love that you use a lot of examples, really helped a lot!!!!
Great videos, liked the important and covered all most all aspect of spread operator. Hoping for more such videos in future.
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 :)
thank you, its always nice to have the notes part for reference
Thanks Colt! It's one of the most extensive video on the topic. Helped me a lot!
I have bought the react course too from Udemy . Can you update it to the latest version ? Facing some issues with projects
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!!
Excellent explanation of the Javascript spread operator. Thank you very much!!!
Please keep making videos like this. Extremely helpful.
Nice! After 5 minutes watching everything got much more clear. Thank you!
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 :)
hey Colt. I love the Notion notes. Thanks for awesome video
Very helpful. I've tried to learn spread a few times, but I think this will still now, thanks.
Colt you are incredible. Honestly, I wouldn't use the notes over quickly searching for an example.
This video is one of the best video I found on CZcams.. Please make this type of videos.😊
Thumbs up just after 1min due to the notion notes. Love the idea!
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.
Thanks - this is great information! YES, the notes are very helpful - keep up the good work!
Keep them notes coming! Helping me a lot.
you cleared up all the confusion in my brain, great explantation tahnk you!
Coming directly from your react bootcamp to have more understanding of spread operator and notes helps(actually saved it as well ^_^)
thank you for this video. spread operator makes a lot of sense now
bro you are really good at this keep it up, it is helping me loads!
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.
Best spread operator tutorial ever! Thanks for sharing your knowledge in a simple and easy to understand way. =)
colt you have saved my miserable life,thank you from the bottom of my heart!
I understood this thanks to you, thank you for being so clear and thorough !
The notes are great. They are very useful. Thanks for all of your content.
Can also inexpensively _gift_ Colt's exhaustive self-paced course to someone you know... _Highly_ recommended.
Simply an awesome video :)) Lots of new useful information delivered in a concise and entertaining way.
Thanks Colt, beautiful and dead easy to understand&implement explanation!
Nice explanation, i'm from Paraguay, my english is bad, but i can understand you 80%
New sub, great content
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.
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.
Hey man, thanks for your notes and video! greetings from Venezuela.
I’m working on a react final project for a boot camp and this gave me some really good pointers, concise as always Colt!!
Can i ask you which bootcamp you are in ? and are you happy with the education they gave?
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!
Your notes are very helpful. Thanks for the video!
the first example is amazing. thank you.
Your Notes are awesome................ keep helping us......
Not only do I love Notion, but the notes are very helpful
I'm obsessed with Notion! Love that it supports code syntax highlighting and embedded gists. I wish I was on the Notion dev team :)
10:48 Take a bow! You nailed it. Thank you for sharing...
or smoke a bowl! You earned it! 420 blaze it brooooooo :)
Notes are VERY useful and much appreciated.
This greatly clarifies an unknown I've had in my head for months.
This solves a lot of problems for me. Thank you!
awesome video i also like the notes. makes it really easy to reference the material
Borderlands references in a JS video, that was unexpected. Nice one!
Great job dude! p.s: the notes are really helpful, so please don't ditch them :P
Thanks Colt Steele super helpful! bought your React Bootcamp too!
Very well done, and the notes are a great additon!
Thank you so much sir,this is really helpful,i read the article too,so useful,thanks again.
Thank you! The notes are great, way better than MDN
Thanks for this i've been learning react lately and this just clarified a lot
Same here :)
Very good explanation!
Thank you, the notes helped a lot :D
Dude you are awesome, please keep the notes!
I liked the way you explain about everything. Please add advanced react projects. Tnx lot
Thank you. Very clearly explained the spread operator.
I was so confused, this helped a lot.
First time i see your videos then i should subscribe ... amazing explanation
Notes were helpful! Thank you!
Love your style of teaching, subbed
I subscribed partially because you said "... do all of that annoying stuff". I like the realism: good video.