Skip to content

Commit 7754285

Browse files
authored
Merge pull request lydiahallie#760 from gustavoiha/master
docs: make question 3 explanation more comprehensive
2 parents 7db9cca + 7d52966 commit 7754285

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Note that the value of `diameter` is a regular function, whereas the value of `p
142142

143143
With arrow functions, the `this` keyword refers to its current surrounding scope, unlike regular functions! This means that when we call `perimeter`, it doesn't refer to the shape object, but to its surrounding scope (window for example).
144144

145-
There is no value `radius` on that object, which returns `NaN`.
145+
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`.
146146

147147
</p>
148148
</details>

0 commit comments

Comments
 (0)