Skip to content
Permalink
Browse files
Merge pull request web#27 from charle44/patch-7
typo ammendment
  • Loading branch information
aa7401 committed Oct 26, 2019
2 parents 48310c0 + 0e7ec41 commit fbf88690788c9aa5d45047f88988f526edf498a4
Showing 1 changed file with 1 addition and 1 deletion.
@@ -685,7 +685,7 @@ const matt = new ECMA6Student('matt')
console.log(ECMA6Student.studentCount()) // prints '2'
```
Notice that the static vsriable `count` is public (so the `studentCount()` method is somewhat superfluous in this example!). This highlights one of the limitations of JavaScript, the lack of a simple way to define private attributes (variables and methods). The next section goes into this in more detail and explains some workarounds (hacks) to get around this.
Notice that the static variable `count` is public (so the `studentCount()` method is somewhat superfluous in this example!). This highlights one of the limitations of JavaScript, the lack of a simple way to define private attributes (variables and methods). The next section goes into this in more detail and explains some workarounds (hacks) to get around this.
### 4.5 Handling Data Encapsulation

0 comments on commit fbf8869

Please sign in to comment.