Optional Chaining Operator in JavaScript

preview_player
Показать описание
🙃 Support the show by becoming a Patreon

🔗 Discuss this video on the Fun Fun Forum

🔗 Babel plugin to use Optional Chaining today

🔗 Many examples taken from this excellent article

🔗 mpj on Twitter

🔗 Help translate the show to your language

In this episode, we’re going to talk about the Optional Chaining Operator in JavaScript, which is a proposal to ecmascript as of writing.
Рекомендации по теме
Комментарии
Автор

Technically we are all watching from the future since this is not a live stream!!!

martinbjorck
Автор

kind of the best episode ever -- js fundamentals, cats, intro, music and costumes, and lots of code -- past, present and future!

billybobgeo
Автор

This went over my head a bit, but I did enjoy it. Watching this playlist is helping me understand why I didn't get much out of this channel previously as I was learning the fundamentals. Now that I'm starting to get comfortable with the complete world of Front End Web Development, I can appreciate these offering more each day. Thank you. You explain deep level topics very well.

busyrand
Автор

Just wanted to say @mpj, that you're videos are videos are very motivating and help me get into the right mindset on things. I don't always see eye to eye on your opinion on how to structure things, etc, but very thoroughly enjoy listening to your thought process and explanation on things, and it challenges me to revisit a lot of my own ideals on ways to do things, and reflect on if I could be doing them better.

I find myself with a quiet evening that I rarely have, and was just about to sit down and play some video games to relax, and these videos provide just the right amount of spark to motivate me to spend some time sinking a few hours into a fun little side project instead.

Keep up the awesome work!

TheNeonRaven
Автор

I must leave a comment right after checking the notification email, and before I watch this video. I was so glad and excited when I saw the comeback of one video of the javascript episode. And so does the beautiful video intro, of course. Well done!

dylandang.
Автор

I love the idea of optional chaining operators. It's something I'd definitely use. I get tripped up by this more often than I should!

Glad to see the intro back too.

SteveJRobertson
Автор

I need the intro, it completes my funfunfunction experience!! Thanks for walking us through how much this new feature does for us!!

bohemian_demon
Автор

As soon as I saw the first example, I was on board. This is a great feature for js to have. I look forward to it being normal

mybigbeak
Автор

this operator is also in swift and kotlin . it saved me so many times and it stil does. this will make js a loved language.
everyone that does not agree with it, is because they have never used it before, but once you do you can't live without it

ionutale
Автор

I love this in C#. The Elvis operator really is very useful.

maccabeeodin
Автор

Du är så duktigt!! 😍. Jag älskar att kolla på dina videos och du har lärt mig så himla mycket. Tack för relevant content som håller sig till ämnet och som ger ännu mer värde en bara en "lektion". Känns som att det är mer som parprogrammering än något annat!

Sockermonstret
Автор

Optional Chaining Operator should be a must! It's gonna save us all a lot of time !

despertaweb
Автор

Roligaste avsnittet hittills! Karaktärerna har verkligen gjort att det känns som mer än bara en vlogg, ser gärna mer av dem :)

augustcom
Автор

These days I like the video first, then watch it. It's all data driven :D

DimoDimov
Автор

Man, did I miss those kind of videos. There's fun and crazy in it. Love it

cassioscabral
Автор

I think this could be useful, as you've shown there're other methods to do the "same" thing.
But this is just shorter and quite easy to understand if you see it in someones code.
I'm all for it! Thanks for sharing this!

gilappa
Автор

Omg this is just friggin awesome! Love the format of delivery !

DehanDeCroos
Автор

I never comment videos, but I had to comment this on. It's awesome!!! Showing all the possibilities and doing it in interesting and funny way. As far as I concern, you have the best educational videos.

yndyan
Автор

I first saw this used when writing an angular app a few weeks ago and was amazed.

I agree keeping JavaScript lean is important, but this feature is SO incredibly useful and easy to interpret. I say add it!

AuricSlayer
Автор

It can also be written like this:
const zip = ((user || {}).address || {}).zip
not so much code but still verbose

ДанилаГудков-ях