Skip to Main Content
Hands-On Functional Programming with TypeScript
book

Hands-On Functional Programming with TypeScript

by Remo H. Jansen
January 2019
Beginner content levelBeginner
210 pages
4h 47m
English
Packt Publishing
Content preview from Hands-On Functional Programming with TypeScript

Function scope and hoisting

Low-level languages, such as C, have low-level memory management features. In programming languages with a higher level of abstraction, such as TypeScript, values are allocated when variables are created, and automatically cleared from memory when they are no longer used. The process that cleans the memory is known as garbage collection and is performed by the JavaScript runtime garbage collector.

The garbage collector does a great job, but it is a mistake to assume that it will always prevent us from facing a memory leak. The garbage collector will clear a variable from the memory whenever the variable is out of scope. It is important to understand how the TypeScript scope works in order for us to understand the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Functional Programming in JavaScript

Functional Programming in JavaScript

Luis Atencio
TypeScript Quickly

TypeScript Quickly

Yakov Fain, Anton Moiseev
Functional Programming in Kotlin

Functional Programming in Kotlin

Runar Bjarnason, Paul Chiusano, Marco Vermeulen

Publisher Resources

ISBN: 9781788831437Supplemental Content