正在加载视频...

视频加载失败

Javascript has a really cool operator called Nullish Coalescing & it can help you out! It's a logical operator that returns the value of the right side if it is null or undefined const cars = numberOfCars ?? 'incomplete data' If the numberOfCars is null we see incomplete data

73,419 次观看 • 3 年前 •via X (Twitter)

11 条评论

Danny Thompson 的头像
Danny Thompson3 年前

Like this kind of tech content? Let me know! Thinking about creating a lot more of it. Breakdowns to make concepts easier to digest and understand. Make sure to share this with someone! Never know who might learn something new!

Alex Robinett 的头像
Alex Robinett3 年前

Haha I wish I had seen this before my technical interview yesterday! I got asked what Nullish Coalescing is?! I got it confused with optional chaining. Next time I will be prepared! Thanks for the quick and concise explanation!

Danny Thompson 的头像
Danny Thompson3 年前

Oh nice!!! That's right on time!

K.O.O x #SailsconfAF2025 的头像
K.O.O x #SailsconfAF20253 年前

Thanks for sharing Danny. Nullish coalescing does come in handy!

Danny Thompson 的头像
Danny Thompson3 年前

For sure! Quite a few use cases.

gabriel 繁栄 的头像
gabriel 繁栄3 年前

ive been working with software development for like 4 years and lately I'm not very into it anymore but you explain things in a such amazing way that made me excited about it again!!! thank u so much bro, ure awesome!!!

Danny Thompson 的头像
Danny Thompson3 年前

You genuinely do not know how much comments like this truly mean to me! This is what it is all about and why I do this! Happy to help bring the spark back and get you excited about development again!

DeFi Prince | (Ø,G) 的头像
DeFi Prince | (Ø,G)3 年前

New this Buh the name took long to stick

Danny Thompson 的头像
Danny Thompson3 年前

Glad you were familiar with it!

Lennox Charles 🚀 的头像
Lennox Charles 🚀3 年前

Thanks for sharing Danny, this is useful 🤝

Danny Thompson 的头像
Danny Thompson3 年前

Glad you found it useful! Never know who needs to see it and learn from it!

相关视频