Skip to content

Commit 67d1764

Browse files
authored
Fix variable name in Q11 answer
Should fix lydiahallie#16
1 parent 55b66a3 commit 67d1764

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
@@ -353,7 +353,7 @@ You can't add properties to a constructor like you can with regular objects. If
353353

354354
`Person.prototype.getFullName = () => this.firstName + this.lastName`
355355

356-
would have made `lydia.getFullName()` work. Why is this beneficial? Say that we added this method to the constructor itself. Maybe not every `Person` instance needed this method. This would waste a lot of memory space, since they would still have that property, which takes of memory space for each instance. Instead, if we only add it to the prototype, we just have it at one spot in memory, yet they all have access to it!
356+
would have made `member.getFullName()` work. Why is this beneficial? Say that we added this method to the constructor itself. Maybe not every `Person` instance needed this method. This would waste a lot of memory space, since they would still have that property, which takes of memory space for each instance. Instead, if we only add it to the prototype, we just have it at one spot in memory, yet they all have access to it!
357357

358358
</p>
359359
</details>

0 commit comments

Comments
 (0)