Kyle Simpson

#YDKJS
#You_Dont_Know_JS
#JavaScript
📘 مجموعه You Don’t Know JS — کتاب Scope and Closures
🧠 مهم نیست چقدر با JavaScript کار کردی؛ احتمال زیاد هنوز همه جزئیات این زبان رو کامل درک نکردی. این کتاب دقیقاً روی دو مفهوم کلیدی و عمیق تمرکز میکنه: Scope و Closures — دو پایهای که برای تبدیل شدن به یک JavaScript developer حرفهای باید کامل بفهمیشون.
⚙️ مثل بقیه کتابهای مجموعه You Don’t Know JS، این جلد هم میره سراغ بخشهایی از زبان که اکثر توسعهدهندهها یا ازشون فرار میکنن یا سطحی ازشون عبور میکنن. هدف اینه که به جای حفظ کردن رفتارها، واقعاً بفهمی پشت صحنه چه اتفاقی میافته.
🧰 در این کتاب یاد میگیری:
📍 مفهوم Scope و اینکه موتور JavaScript چطور متغیرها رو در کد پیدا میکنه
🧭 ساختار nested scope و نحوه سازماندهی متغیرها و functionها
🧱 تفاوت function scope و block scope بههمراه مفهوم hoisting و الگوهای مرتبط با مخفیسازی scope
🔁 استفاده از closures در سناریوهای synchronous و asynchronous مثل ساخت کتابخانههای JavaScript
📚 در نهایت هدف اینه که درک عمیقتری از JavaScript پیدا کنی و به جای حدس زدن رفتارها، بتونی دقیق توضیح بدی چرا و چطور کار میکنن.
📚 فهرست مطالب
1. Scope چیست؟
2. Scope لغوی (Lexical Scope)
3. Function Scope در برابر Block Scope
4. Hoisting
5. Scope Closure
✍️ از نویسنده
🧠 مجموعه کتابهای You Don’t Know JS برای این نوشته شدن که به ما (از جمله خود نویسنده) کمک کنن با واقعیت روبهرو بشیم: بخشهای زیادی از JavaScript رو فکر میکنیم بلدیم، اما در واقع درکشون سطحی و ناقصه. این کتابها به جای پذیرش این بخشها بهعنوان یک black box، وارد عمقشون میشن و توضیح میدن دقیقاً چه اتفاقی زیر سطح داره رخ میده.
🎯 هدف اینه که در نهایت درک عمیقتر و اعتماد بیشتری به JavaScript داشته باشی و واقعاً بتونی بگی JS رو میفهمی.
👨💻 درباره نویسنده
👨💻 کایل سیمپسون یک Open Web Evangelist از آستین، تگزاسه. تمرکز اصلیاش روی JavaScript، HTML5، ارتباطات real-time و performance وبه. او نویسنده، مدرس کارگاههای آموزشی، سخنران فنی و عضو فعال جامعه open-source است.
🔍 مشاهده سایر کتابهای مجموعه You Don’t Know JS:
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.
Like other books in the "You Don’t Know JS" series, Scope and Closures dives into trickier parts of the language that many JavaScript programmers simply avoid. Armed with this knowledge, you can achieve true JavaScript mastery.
Table of Contents
Chapter 1: What Is Scope?
Chapter 2: Lexical Scope
Chapter 3: Function Versus Block Scope
Chapter 4: Hoisting
Chapter 5: Scope Closure
Appendix A: Dynamic Scope
Appendix B: Polyfilling Block Scope
Appendix C: Lexical this
Appendix D: Acknowledgments
From the Author
The "You Don't Know JS" book series is intended to bring us all (myself included!) to terms with the reality that there's an awful lot of JS that we think we kinda know, but we don't really have total confidence in. Rather than leaving these topics to the misunderstanding, and treating certain things as a black box we can't understand, we dive deeply into them and try to uncover exactly how and why they work.
It is my hope that you will come away from these books with a much deeper confidence in, and appreciation for, JavaScript. Isn't it time we all start really knowing JS?
About the Author
Kyle Simpson is an Open Web Evangelist from Austin, TX. He's passionate about JavaScript, HTML5, real-time/peer-to-peer communications, and web performance. Otherwise, he's probably bored by it. Kyle is an author, workshop trainer, tech speaker, and avid OSS community member.
🔎 The YOU DON’T KNOW JS series includes:









