meta_pixel
Tapesearch Logo
Log in
Syntax - Tasty Web Development Treats

Hasty Treat - A Podcast About Nothing

Syntax - Tasty Web Development Treats

Wes Bos

Tech News, News, Technology

4.91.2K Ratings

🗓️ 11 January 2021

⏱️ 15 minutes

🧾️ Download transcript

Summary

In this Hasty Treat, Scott and Wes talk about nothing — null, undefined, void, false, 0, ‘’, NaN, [], {}, never — all sorts of values that could mean the things that do not exist. Prismic - Sponsor Prismic is a Headless CMS that makes it easy to build website pages as a set of components. Break pages into sections of components using React, Vue, or whatever you like. Make corresponding Slices in Prismic. Start building pages dynamically in minutes. Get started at prismic.io/syntax. LogRocket - Sponsor LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at logrocket.com/syntax. Show Notes 03:35 - Undefined Implicitly nothing A variable declared, but not set is undefined 04:25 - Null Explicitly nothing 04:41 - Null vs Undefined Null has a value of nothing Undefined does not have a value You can set variables to either If you want to set a score variable to nothing, set it to null If you want to un-set a value, set it to undefined == will check if a value is either null or undefined 05:35 - Void In Javascript You can pop void in front of calling a function and it will return undefined (even if that function returns a value) I’ve seen it on links that go nowhere (don’t do this — use a button) To prevent an arrow function from leaking onSubmit="javascript:void()" is a quick-n-easy prevent default on forms In Typescript Void is when you don’t care about what is returned from a function, or if nothing is returned A click handler that goes off and does stuff (side effect) can return void 09:15 - Never (in Typescript) Some functions will never return: Functions that throw errors Functions that have infinite loops Also, unreachable variables have a type of never if(true == false) { let var = 'this will never be true'; } 11:05 - Falsy values 0, -0, 0n false ‘’ (empty string) Empty array Is a value Its .length can be falsy Empty object Is a value Its object.keys(object) length can be falsy (0) Tweet us your tasty treats! Scott’s Instagram LevelUpTutorials Instagram Wes’ Instagram Wes’ Twitter Wes’ Facebook Scott’s Twitter Make sure to include @SyntaxFM in your tweets

Transcript

Click on a timestamp to play from that location

0:00.0

Monday, Monday, Monday,

0:02.0

Open wide Dev fans.

0:04.0

Get ready to stuff your face

0:06.0

with JavaScript, CSS, node modules, barbecue tips,

0:09.0

get workflows,

0:10.0

break dancing, soft skills, web development,

0:12.0

the hastiest, the craziest, the craziest development the hastiest the craziest the tastiest web development treats coming in hot here is

0:18.1

Wes Barracuda bars and Scott El Toroloco, Tolinsky.

0:25.0

What's the deal with Void?

0:30.0

In this episode of Syntax, this is going to be the show about nothing and that's a

0:34.3

signfold joke off the top for you that was my best Jerry that I could do

0:41.5

Yeah, we're going to be talking all about nothing in this episode and I'm not talking about

0:47.3

Absolutely nothing. I'm talking about no undefined void false zero non, non-bred, empty arrays,

0:54.3

empty objects, never.

0:55.8

All sorts of values that could mean things that do not exist.

0:59.2

In fact, I would love to have a zero zip nada inside of JavaScript as well. My name is Scott

1:03.6

Toulinsky. I'm a full stack developer from Denver Colorado and with me as

1:06.3

always is the West boss. Hey everybody today we are sponsored by two awesome

1:12.3

companies, Prismic and Log Rocket.

1:14.4

But let me tell you a little bit about Prismic.

1:16.4

Well, you know Prismic.

1:17.6

It's a headless CMS, gives you a graphical API.

...

Please login to see the full transcript.

Disclaimer: The podcast and artwork embedded on this page are from Wes Bos, and are the property of its owner and not affiliated with or endorsed by Tapesearch.

Generated transcripts are the property of Wes Bos and are distributed freely under the Fair Use doctrine. Transcripts generated by Tapesearch are not guaranteed to be accurate.

Copyright © Tapesearch 2026.