Nullish Coalescing Operator - Unleash the Power of JavaScript Updates

Published: 06 February 2024
on channel: Good Morning Developers
1,761
58

ECMAScript2020 (ES11) gives us another fantastic way to short-circuit our JavaScript when running into those pesky cases that have null and undefined. I guarantee you'll find a use for it :) With ?? we can hold up our code from running in cases where we need to know if something is nullish, similar to || but with more control. It works really well with optional chaining, and with a bit of practice, I bet you'll use it a ton.

Optional Chaining -    • Optional Chaining In JavaScript: Awes...  
Code: https://github.com/robertbunch/es-next
History of ECMAScript/JavaScript (long) -    • Visual Timeline of JavaScript and ECM...  
History of ECMAScript/JavaScript (shorter) -    • Visual Timeline of JavaScript and ECM...  

0:00 - Intro
0:23 - The Docs
0:55 - Nullish vs. Falsy
1:36 - Or vs. ??
2:18 - How to Use It - Use Case
5:52 - w/And and Or & More Examples
7:23 - w/optional chaining operator
9:27 - w/Functions


Watch video Nullish Coalescing Operator - Unleash the Power of JavaScript Updates online without registration, duration hours minute second in high quality. This video was added by user Good Morning Developers 06 February 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,761 once and liked it 58 people.