Skip to content

Commit

Permalink
typo & readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
alok722 committed Jan 27, 2023
1 parent 08fa798 commit 99d960f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/lectures.html
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ <h1 id="episode-7--the-scope-chain-scope--lexical-environment"><a class="header-
} // a is lexically inside global execution
</pre>
</li>
<li><p>Lexical or Static scope refers to the accessibility of variables, functions and object based on phylical location in source code.</p>
<li><p>Lexical or Static scope refers to the accessibility of variables, functions and object based on physical location in source code.</p>
<pre class="prettyprint">Global {
Outer {
Inner
Expand Down Expand Up @@ -720,7 +720,7 @@ <h3 id="q4-will-inner-function-have-the-access-to-outer-function-argument"><a cl
}
<span class="hljs-keyword">return</span> inner;
}
outer(<span class="hljs-string">&quot;Hello There&quot;</span>)(); <span class="hljs-comment">// 10 &quot;Hello There&quot;</span></code></pre><p><strong>Ans</strong>: Inner function will now form closure and will have access to both a and b.</p>
outer(<span class="hljs-string">&quot;Hello There&quot;</span>)(); <span class="hljs-comment">// 10 &quot;Hello There&quot;</span></code></pre><p><strong>Ans</strong>: Inner function will now form closure and will have access to both a and str.</p>
<h3 id="q5-in-below-code-will-inner-form-closure-with-outest"><a class="header-link" href="#q5-in-below-code-will-inner-form-closure-with-outest"></a>Q5: In below code, will inner form closure with <strong>outest</strong>?</h3>
<pre class="hljs"><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">outest</span>(<span class="hljs-params"></span>) </span>{
<span class="hljs-keyword">var</span> c = <span class="hljs-number">20</span>;
Expand Down
Binary file modified dist/namaste-javascript-notes.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion notes/lecture-7.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ console.log(b); // Error, Not Defined
} // a is lexically inside global execution
```

* Lexical or Static scope refers to the accessibility of variables, functions and object based on phylical location in source code.
* Lexical or Static scope refers to the accessibility of variables, functions and object based on physical location in source code.
```js
Global {
Outer {
Expand Down
4 changes: 2 additions & 2 deletions notes/lectures.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ console.log(b); // Error, Not Defined
} // a is lexically inside global execution
```

- Lexical or Static scope refers to the accessibility of variables, functions and object based on phylical location in source code.
- Lexical or Static scope refers to the accessibility of variables, functions and object based on physical location in source code.

```js
Global {
Expand Down Expand Up @@ -805,7 +805,7 @@ function outer(str) {
outer("Hello There")(); // 10 "Hello There"
```

**Ans**: Inner function will now form closure and will have access to both a and b.
**Ans**: Inner function will now form closure and will have access to both a and str.

### Q5: In below code, will inner form closure with **outest**?

Expand Down

0 comments on commit 99d960f

Please sign in to comment.