Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added a minor catch for Question 3 #794

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ With arrow functions, the `this` keyword refers to its current surrounding scope

Since there is no value `radius` in the scope of the arrow function, `this.radius` returns `undefined` which, when multiplied by `2 * Math.PI`, results in `NaN`.

##### Catch: Declaring a variable radius in the global context using the `var` keyword would fix this issue, but declaring the same variable using `let` would still give an issue. [reason](https://stackoverflow.com/questions/60346763/why-global-let-variables-not-added-to-window-object-of-browser#:~:text=This%20is%20by%20design%3A,function%20regardless%20of%20block%20scope.)

</p>
</details>

Expand Down