JavaScript Jabber cover image

JSJ 471: Things Every JavaScript Developer Must Know - Part 3

JavaScript Jabber

00:00

JavaScript

In JavaScript, you can mark something for the garbage collector like assigning null to it. In other languages, there's like free keywords or delete keywords. So when you are done using a variable, you tell it, I'm done with this thing. And in JavaScript, what it does instead is if the if it's returned from the function, then it probably will just get garbage collected right away. This is an optimization, modern things uses if if it doesn't go outside the function scope, it just knows to get rid of it. If that's not important to you, you don't need to know it.

Play episode from 22:30
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app