Isaac Murchie: You and the Temporal Dead Zone, ES6 Variables For Fun and Profit - NEJS Conf 2015
Channel: NebraskaJS
Date: 2015-09-04

ES6 has some new ways for declaring variables. Block scope! Constants (-ish)! JavaScript finally has a variable system that makes some sense.

In this talk we will cover the new syntax for creating variables and constants, and how the new forms change the runtime environment for a JavaScript program. Such phenomena as hoisting vs. the (ominous sounding) "Temporal Dead Zone"; function scope vs. real block scope; real closure over for-loops; and other consequences of the new system.

We will also look at some of the oddities that have crept in with the good parts. This is, after all, JavaScript. So, not-quite-constant constants that refuse to be garbage collected; and a few other wat-inducing fun times.

And, finally, we will look at the ways that ES6 variables make for cleaner and more maintainable code! That is, in the end, the reason to be excited by this all! ES6 is coming! It is coming soon! And it makes some fantastic changes to JavaScript. The variable syntax is the tip of the iceburg but necessary understanding for harnessing the power that will be!

Presented at NEJS Conf 2015 https://nejsconf.com