𝔖 Scriptorium
✦   LIBER   ✦

📁

You Don't Know JS: Scope & Closures

✍ Scribed by Kyle Simpson


Publisher
O'Reilly Media
Year
2014
Tongue
English
Leaves
98
Series
You Don't Know JS
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


No matter how much experience you have with javascript, odds are you don’t fully understand the language. This concise yet in-depth guide takes you inside scope and closures, two core concepts you need to know to become a more efficient and effective javascript programmer. You’ll learn how and why they work, and how an understanding of closures can be a powerful part of your development skillset.

✦ Table of Contents


Foreword v
Preface vii
1. What Is Scope? 1
Compiler Theory 1
Understanding Scope 3
Nested Scope 8
Errors 10
Review 11
2. Lexical Scope 13
Lex-time 13
Cheating Lexical 16
Review 21
3. Function Versus Block Scope 23
Scope From Functions 23
Hiding in Plain Scope 24
Functions as Scopes 28
Blocks as Scopes 33
Review 39
4. Hoisting 41
Chicken or the Egg? 41
The Compiler Strikes Again 42
Functions First 44
5. Scope Closure 47
Enlightenment 47
Nitty Gritty 48
Now I Can See 51
Loops and Closure 53
Modules 56
Review 63
A. Dynamic Scope 65
B. Polyfilling Block Scope 69
C. Lexical this75
D. Acknowledgments 79


📜 SIMILAR VOLUMES


You Don't Know JS: Scope & Closures
✍ Kyle Simpson 📂 Library 📅 2014 🏛 O'Reilly Media 🌐 English

<div><p>No matter how much experience you have with JavaScript, odds are you don’t fully understand the language. This concise yet in-depth guide takes you inside scope and closures, two core concepts you need to know to become a more efficient and effective JavaScript programmer. You’ll learn how a

You Don't Know JS: Scope & Closures
✍ Kyle Simpson 📂 Library 📅 2014 🏛 O'Reilly Media 🌐 English

No matter how much experience you have with JavaScript, odds are you don't fully understand the language. This concise yet in-depth guide takes you inside scope and closures, two core concepts you need to know to become a more efficient and effective JavaScript programmer. You'll learn how and why t

You Don't Know JS Yet: Scope & Closures
✍ Kyle Simpson 📂 Library 📅 2020 🏛 Leanpub 🌐 English

The worldwide best selling You Don't Know JS book series is back for a 2nd edition: You Don't Know JS Yet. All 6 books are brand new, rewritten to cover all sides of JS for 2020 and beyond. You'll still get in-depth coverage of the core language, applied in useful code organization patterns for your

你不知道的JavaScript(上卷)= You Don’t Know JS S
✍ Kyle Simpson ; 赵望野, 梁杰; 📂 Library 📅 2015 🏛 人民邮电出版社 🌐 Chinese

JavaScript语言有很多复杂的概念,但却用简单的方式体现出来(比如回调函数),因此,JavaScript开发者无需理解语言内部的原理,就能编写出功能全面的程序;就像收音机一样,你无需理解里面的管子和线圈都是做什么用的,只要会操作收音机上的按键,就可以收听你喜欢的节目。然而,JavaScript的这些复杂精妙的概念才是语言的精髓,即使是经验丰富的JavaScript开发者,如果没有认真学习也无法真正理解语言本身的特性。正是因为绝大多数人不求甚解,一遇到出乎意料的行为就认为是语言本身有缺陷,进而把相关的特性加入黑名单,久而久之就排除了这门语言的多样性,人为地使它变得不完整、不安全。 “

You Don't Know JS
✍ Kyle Simpson 📂 Library 📅 2015 🏛 O'Reilly Media 🌐 English

<p>No matter how much experience you have with JavaScript, odds are you don't fully understand the language. As part of the "You Don't Know JS" series, this concise yet in-depth guide focuses on new asynchronous features and performance techniques&#8212;including Promises, generators, and Web Worker