Nullish Coalescing operator in JS

The nullish coalescing operator in JavaScript lets us test for any valid non-nullish value in one or more variables.
Code from video: gist.github.com/prof3ssorSt3v...

Пікірлер: 10

  • @johnm8358
    @johnm83582 жыл бұрын

    Like these short and concise learning

  • @ayyubme
    @ayyubme2 жыл бұрын

    Thank you Steve!

  • @agent-33
    @agent-332 жыл бұрын

    Really useful if you want to use non-falsey value as default and you want '' and 0 to be valid values.

  • @faizanahmed9304
    @faizanahmed93042 жыл бұрын

    Was waiting for this, I used to have confusion between ?. and ??, but now cleared. Thank you professor.

  • @anesdiaf
    @anesdiaf2 жыл бұрын

    Thank you sensei.

  • @pini01ru
    @pini01ru2 жыл бұрын

    Just amazing, thanks!

  • @MarstonH
    @MarstonH5 ай бұрын

    u da man

  • @solanx
    @solanx Жыл бұрын

    I'm confused about your usage of the terminology 'Nullish A s s i g n m e n t Operator'. I thought that.. "??" operator is the 'nullish coalescing operator' (the one you are talking about here) and "??=" operator is the so called 'nullish coalescing a s s i g n m e n t operator'. So to my understanding, the first one just r e t u r n s a value and the last one a s s i g n s a value to a variable, or am I missing something?

  • @SteveGriffith-Prof3ssorSt3v3

    @SteveGriffith-Prof3ssorSt3v3

    Жыл бұрын

    OMG. That is a huge brain fart on my part. Yes this is the nullish coalescing operator that I am talking about here. It is not the nullish coalescing assignment operator which I had planned in another example. Thanks for pointing that out. I will be posting the other, which I had originally intended to post soon.

  • @solanx

    @solanx

    Жыл бұрын

    @@SteveGriffith-Prof3ssorSt3v3 🎩😅