Array and Object Spread Syntax - Javascript In Depth

preview_player
Показать описание
We take a look at the spread syntax (...) in Javascript together and it's use with Arrays and Objects specifically. This is a newer Javascript syntax that allows us to quickly make copies of Iterables and Objects with less and more readable code.

Chapters:
00:00 Introduction
00:58 Iterable Recap
01:45 Spread Syntax Uses
02:31 Array Spread
03:41 Array Spread Code Example
08:50 String Spread
09:31 String Spread Code Example
10:38 Set Spread
11:17 Set Spread Code Example
13:24 Map Spread
15:33 Map Spread Code Example
18:22 Object Spread
20:02 Object Spread Code Example
26:29 Object Spread Duplicate Keys
30:16 Shallow Copy Array Spread
36:04 Shallow Copy Object Spread
40:47 Next steps

Рекомендации по теме
Комментарии
Автор

You might not realize, but you are doing god's work here by teaching JS in such a detailed manner.

bytesizedscreencasts
Автор

I think the spread syntax is an amazing addition, and creates more concise cleaner code. We just have to remember it only makes copies when dealing with primitives, and it'll make a reference when spreading non-primitives. It's also way easier to read, and add values when using spread syntax. Thank you for the knowledge Nader! and also I forgot its important to remember the flow of the code because you can overwrite code with spread syntax.

KRAKENBACK..
Автор

Congrats! God Nader, for 4k subs, your videos are goldmine. I learnt a lot, Thanks!

kinrev
Автор

Nader 👋🏻 great to see you on YouTube! The Tesla bot 🤓

khanittaajay
Автор

spread seems like it’s going to be a huge timesaver, just gotta remember it’s shallow!

tomboolery
Автор

I think you have a small typo right there at the Map spread section of the video where you use .add() on Maps instead of .set()

Proton_uio
Автор

Hey Nader, do you have any sort of discord group where we could share screenshots of problems/questions. Nader, each video is just as good as the one before. Thank you for making in-depth videos and taking your time in explaining concepts. Would have easily paid for this content. Eagerly looking forward to Node/Express/MongoDB videos after JS :)

simplyskandi