Closures
What a closure keeps
A function keeps the bindings it could see, not the values they held when it was made. · 10 minutes
A function made inside a scope can still read that scope's names after the scope has finished running. That much most people know. What it keeps is the part that surprises them: not a snapshot of the values, but the bindings themselves.
So a closure reads a variable the way any other code does — at the moment it reads it.
let limit = 10; const check = () => limit; limit = 20; — what does check() return?