Kyle Simpson

#YDKJS
#You_Dont_Know_JS
#JavaScript
🚀 مجموعه پرفروش جهانی «You Don’t Know JS» با نسخه دوم خودش برگشته: You Don’t Know JS Yet. همه ۶ کتاب کاملاً بازنویسی شدن تا تمام جنبههای JavaScript رو برای سال ۲۰۲۰ و بعد از اون پوشش بدن. همچنان هم عمق بالای زبان حفظ شده و با الگوهای کاربردی برای سازماندهی کد در پروژهها ترکیب شده. در کنار اون، با لحن گفتوگومحور Kyle، وارد بحثهای دقیق و چالشبرانگیز درباره سوالهای رایج توسعهدهندهها میشی.
📘 کتاب دوم این مجموعه یعنی Scope & Closures بهصورت عمیق بررسی میکنه که چطور و چرا باید متغیرها رو داخل «باکتهای مختلف scope» سازماندهی کنیم تا از افشای بیش از حد scope جلوگیری بشه و نگهداری کد سادهتر بشه. علاوه بر lexical scope، مفهوم closure به تو اجازه میده توابع مثل یک حافظه عمل کنن و متغیرها رو بین اجراها حفظ کنن. در نهایت هم modules با استفاده از scope و closure برای کپسولهسازی داده و رفتار استفاده میشن.
⚡ در این کتاب با این موارد آشنا میشی:
🔒 تو در تو کردن scopeهای lexical با استفاده از functionها و blockها برای محدود کردن دسترسی به متغیرها
🧠 اینکه چطور functionها از طریق closure متغیرها رو به خاطر میسپارن
📦 ماژولها بهعنوان یکی از مهمترین الگوهای سازماندهی کد در برنامهنویسی
📖 فهرست مطالب:
👨💻 درباره نویسنده:
👨🏫 کایل سیمپسون یک evangelist برای Open Web هست که به همه چیزهای مرتبط با JavaScript علاقه داره. او نویسنده، مدرس، سخنران و عضو فعال جامعه متنباز (OSS) محسوب میشه.
🔍 از مجموعه You Don't Know JS Yet فقط دو کتاب منتشر شد:
🔍 از مجموعه You Don’t Know JS شش جلد منتشر شده و همگی در سایت موجود است:
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 programs. And of course, through Kyle's unique perspective and conversational tone, explore passionate, reasoned debate of the most common questions developers face.
Scope & Closures, the second book in the new edition series, dives deep into how and why to organize variables into different buckets of scope, limiting scope over-exposure and improving code maintainability. On top of lexical scope, closure empowers functions with memory, preserving variables across calls. Modules leverage scope and closures to encapsulate data and behavior.
In Scope & Closures, you'll dig into:
Table of Contents
Chapter 1: What's the Scope?
Chapter 2: Illustrating Lexical Scope
Chapter 3: The Scope Chain
Chapter 4: Around the Global Scope
Chapter 5: The (Not So) Secret Lifecycle of Variables
Chapter 6: Limiting Scope Exposure
Chapter 7: Using Closures
Chapter 8: The Module Pattern
About the Author
Kyle Simpson is an evangelist of the Open Web, passionate about all things JavaScript. He's an author, trainer, speaker, and OSS contributor.









