---
product_id: 3479611
title: "You Don't Know JS: Scope & Closures"
price: "€ 16.31"
currency: EUR
in_stock: true
reviews_count: 13
url: https://www.desertcart.pt/products/3479611-you-dont-know-js-scope-and-closures
store_origin: PT
region: Portugal
---

# You Don't Know JS: Scope & Closures

**Price:** € 16.31
**Availability:** ✅ In Stock

## Quick Answers

- **What is this?** You Don't Know JS: Scope & Closures
- **How much does it cost?** € 16.31 with free shipping
- **Is it available?** Yes, in stock and ready to ship
- **Where can I buy it?** [www.desertcart.pt](https://www.desertcart.pt/products/3479611-you-dont-know-js-scope-and-closures)

## Best For

- Customers looking for quality international products

## Why This Product

- Free international shipping included
- Worldwide delivery with tracking
- 15-day hassle-free returns

## Description

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. Learn about scope, a set of rules to help JavaScript engines locate variables in your code Go deeper into nested scope, a series of containers for variables and functions Explore function- and block-based scope, “hoisting”, and the patterns and benefits of scope-based hiding Discover how to use closures for synchronous and asynchronous tasks, including the creation of JavaScript libraries

Review: Excellent Book, Could Use Some Squirrels, Highly Recommended - This is an excellent book overall. I can use it to improve my understanding of JavaScript and thereby also improve own JavaScript code. I think what won me over to the book was reading some of the bits of how Javascript code compilation occurs, starting with tokenizing, and the "conversations" between Engine, Compiler and Scope. I realized I needed to read the book cover to cover. A few months after purchasing the book, I'm getting near the end of it, and thoroughly enjoying it. The book explains scope and closures in great detail, with example code that is repeatable (although if you want to use the 'let' verb within a script that will be executed by the Node.js v0.10.31 engine, you will need to do that in strict mode and use the --harmony flag.) I will need to re-read this book a few times over for the examples and discussion to really strike home, but I have had several moments already where the author helps me understand why my own application code is having trouble. For example, I'm having variable collisions and I'm not using function expressions and/or immediately invoked function expressions when I really should. This book is teaching me these things and showing me a better way to code. It is helping me to think like Compiler, Scope and Engine when I see my code. This must be the first technical book I've actually read that makes fleeting reference to Luke Skywalker. Maybe JavaScript really does need someone with a "warrior aiming for excellence" viewpoint in order to convince developers to master it? Resig and Bibeault, after all, recall the ways of the ninja. Well, if I were to compare myself to a warrior, it would have to be as a recruit in the most basic training camp. Even in this setting I can accomplish more with a close study of this book. I might even become a pretty good coder. For others, I'm sure they can rise to the ninja or even the Skywalker planes. In fact this book is so good that I ordered the other print book and pre-ordered all the titles which will be released in November for this series. Let us look at the ways this book could be improved: The author uses parenthetical (writing too much). For example: "We take an inner function (named timer)..." could just as easily be written without the parentheses: "We take an inner function named timer...". I personally find parenthetized text distracts me from the real point the author is trying to make. There are loads of "crow" icons in the book (meaning general notes), but no "squirrel" (to signify a tip or suggestion) or "lobster" (warning) icons. I'd love to see some squirrels! The reader has to decide when the author must be passing on a coding tip. Or perhaps he doesn't want to mess with that? There is no book index. There is no history of how the book was funded over Kickstarter, and I would love to know more about that. With that said, this book is worth every penny of my money and I expect the entire series will be, too. If you are a beginner at JavaScript, buy this book!
Review: Well worth reading. - Excellent book. I have been working with Javascript for many years. But, could never really wrap my head around scope and closures. Can't say I have it fully mastered yet. But, thanks to this book I am miles ahead of where I was. Kyle Simpson has a talent for explaining things in a way that manage to get through. This is a book worth reading once a year as you develop so that you can dig deeper and deeper. I don't say this because you walk away from your first reading puzzled. Rather, for me anyway, I walked away from my first reading with a much clearer understanding. And from the second reading even more. Trouble is, in javascript there are many intertwined topics. After reading "Scope & Closures" I read Kyle's book on "This". That cleared up even more, so that rereading Scope & Closures elucidated further. The depths of javascript are not linear. So touching on certain topics from different angles is a good approach -- imo. And this book definitely gives you another perspective.

## Technical Specifications

| Specification | Value |
|---------------|-------|
| Best Sellers Rank | #1,529,804 in Books ( See Top 100 in Books ) #276 in JavaScript Programming (Books) #2,185 in Software Development (Books) #2,876 in Computer Programming Languages |
| Customer Reviews | 4.7 out of 5 stars 495 Reviews |

## Images

![You Don't Know JS: Scope & Closures - Image 1](https://m.media-amazon.com/images/I/81zWsOMWE4L.jpg)

## Customer Reviews

### ⭐⭐⭐⭐⭐ Excellent Book, Could Use Some Squirrels, Highly Recommended
*by R***N on September 7, 2014*

This is an excellent book overall. I can use it to improve my understanding of JavaScript and thereby also improve own JavaScript code. I think what won me over to the book was reading some of the bits of how Javascript code compilation occurs, starting with tokenizing, and the "conversations" between Engine, Compiler and Scope. I realized I needed to read the book cover to cover. A few months after purchasing the book, I'm getting near the end of it, and thoroughly enjoying it. The book explains scope and closures in great detail, with example code that is repeatable (although if you want to use the 'let' verb within a script that will be executed by the Node.js v0.10.31 engine, you will need to do that in strict mode and use the --harmony flag.) I will need to re-read this book a few times over for the examples and discussion to really strike home, but I have had several moments already where the author helps me understand why my own application code is having trouble. For example, I'm having variable collisions and I'm not using function expressions and/or immediately invoked function expressions when I really should. This book is teaching me these things and showing me a better way to code. It is helping me to think like Compiler, Scope and Engine when I see my code. This must be the first technical book I've actually read that makes fleeting reference to Luke Skywalker. Maybe JavaScript really does need someone with a "warrior aiming for excellence" viewpoint in order to convince developers to master it? Resig and Bibeault, after all, recall the ways of the ninja. Well, if I were to compare myself to a warrior, it would have to be as a recruit in the most basic training camp. Even in this setting I can accomplish more with a close study of this book. I might even become a pretty good coder. For others, I'm sure they can rise to the ninja or even the Skywalker planes. In fact this book is so good that I ordered the other print book and pre-ordered all the titles which will be released in November for this series. Let us look at the ways this book could be improved: The author uses parenthetical (writing too much). For example: "We take an inner function (named timer)..." could just as easily be written without the parentheses: "We take an inner function named timer...". I personally find parenthetized text distracts me from the real point the author is trying to make. There are loads of "crow" icons in the book (meaning general notes), but no "squirrel" (to signify a tip or suggestion) or "lobster" (warning) icons. I'd love to see some squirrels! The reader has to decide when the author must be passing on a coding tip. Or perhaps he doesn't want to mess with that? There is no book index. There is no history of how the book was funded over Kickstarter, and I would love to know more about that. With that said, this book is worth every penny of my money and I expect the entire series will be, too. If you are a beginner at JavaScript, buy this book!

### ⭐⭐⭐⭐⭐ Well worth reading.
*by C***N on October 18, 2014*

Excellent book. I have been working with Javascript for many years. But, could never really wrap my head around scope and closures. Can't say I have it fully mastered yet. But, thanks to this book I am miles ahead of where I was. Kyle Simpson has a talent for explaining things in a way that manage to get through. This is a book worth reading once a year as you develop so that you can dig deeper and deeper. I don't say this because you walk away from your first reading puzzled. Rather, for me anyway, I walked away from my first reading with a much clearer understanding. And from the second reading even more. Trouble is, in javascript there are many intertwined topics. After reading "Scope & Closures" I read Kyle's book on "This". That cleared up even more, so that rereading Scope & Closures elucidated further. The depths of javascript are not linear. So touching on certain topics from different angles is a good approach -- imo. And this book definitely gives you another perspective.

### ⭐⭐⭐⭐ Polarized Opinions
*by W***R on June 11, 2014*

This book will for sure suffer from polarized opinions, but I have no doubt it will become one of the most influential and popular JavaScript books. I came from a Java/Scala background. There are many books that discuss the deep features of those languages and how they are implemented. Through reading them, you get a very nice picture of those languages. It is not the same about JavaScript. Here are some JavaScript books I've read: Professional JavaScript for Web Developers by Nicholas C. Zakas Secrets of the JavaScript Ninja by John Resig and Bear Bibeault Object-Oriented JavaScript, 2nd Edition by Stoyan Stefanov and Kumar Chetan Sharma Granted those books are highly praised in the JS community, they failed to answer one big question: what is JavaScript? What's the functionality of JavaScript? Kyle Simpson addressed this concern open and clear in his preface that he aimed to address those questions. So for me, this is the perfect book. I am now half way through this book, and it is a very well-written book. It's short, but concise. Some people might think the short length of this book should be criticized, but I believe it's a great feature because you will have time to finish the book before the next book come out. It has a clear presentation of hard-to-understand JavaScript concepts along with occasionally visual aids. However, it is not a book for beginners. Beginners might get confused because of the pedantic nature of this book. Also, for some people, who wants more straight-forward explanation and I imagine there are many of them out there, it is unworthy of buying. This book favors jargons, and might have gone too far with them. I don't consider it a problem, but I can see how it might irritate some readers. In chapter 1, author went in a huge length letting us know the difference between LHS and RHS (two types of lookup methods), and carry them through the entire chapter. Is it important? Not really. It seems like as long as you employ the "strict mode", two methods are completely indistinguishable. I'm a graduate student and I'll take a class on compiler construction soon or later, so this little mental exercise is enjoyable for me, but again, some people might ask why presenting them if they barely makes a difference. In chapter 2, author talked about lexical scope, but almost half of the chapter is used to discuss two functions "eval()" and "with()" and then warned you to never use them. I know it sounds like I am complaining, but I'm not. I've tried to understand eval() from other resources (books and blog posts), but through reading this book is the first time I truly understand the concept, and why to avoid them. I will update this review once I finished reading the entire book. Please don't take my criticism as discouraging you from buying this book. This book will grant you the comfort and ease to write JavaScript code. However, if you are not pedantic, or only pursuing the operational side of the language (library user), you should skip the series because you will be irritated and hate this book. If you would like to look deep into JavaScript, this is perhaps the only book that will satisfy your desire right now. Btw, this book will tell you how JavaScript is a true and nicely designed programming language with compilers and execution engines. Buy it if you are from a more serious programming background (C/C++, Java, Scala, Lisp...)

## Frequently Bought Together

- You Don't Know JS: Scope & Closures
- You Don't Know JS: ES6 & Beyond

---

## Why Shop on Desertcart?

- 🛒 **Trusted by 1.3+ Million Shoppers** — Serving international shoppers since 2016
- 🌍 **Shop Globally** — Access 737+ million products across 21 categories
- 💰 **No Hidden Fees** — All customs, duties, and taxes included in the price
- 🔄 **15-Day Free Returns** — Hassle-free returns (30 days for PRO members)
- 🔒 **Secure Payments** — Trusted payment options with buyer protection
- ⭐ **TrustPilot Rated 4.5/5** — Based on 8,000+ happy customer reviews

**Shop now:** [https://www.desertcart.pt/products/3479611-you-dont-know-js-scope-and-closures](https://www.desertcart.pt/products/3479611-you-dont-know-js-scope-and-closures)

---

*Product available on Desertcart Portugal*
*Store origin: PT*
*Last updated: 2026-09-24*