From 8f7d0d20f73fbefd4e5790beb6962cdbbcbf3c1e Mon Sep 17 00:00:00 2001 From: Abhas Bhattacharya Date: Mon, 3 Aug 2020 09:44:28 +0530 Subject: [PATCH] update post: Closure and this - How are variables resolved within functions? --- ckddoqwv80154xvs198jkaa5m.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ckddoqwv80154xvs198jkaa5m.md b/ckddoqwv80154xvs198jkaa5m.md index 9ace100..b7ba135 100644 --- a/ckddoqwv80154xvs198jkaa5m.md +++ b/ckddoqwv80154xvs198jkaa5m.md @@ -176,6 +176,8 @@ b. else, move up to parent scope and repeat. It will finally reach global scope, which always provides a `this` value (global object). For modules, it will stop at the module scope - whose `this` value is `undefined`. +In short, it means that the value of `this` will be resolved from the closest `this`-providing scope. (Follow the table above.) + ### What does this explain?