Commit 4df1cb9
authored
not proved features of class properties
"The property name is not placed into User.prototype. Instead, it is created by new before calling the constructor, it’s a property of the object itself."
you are talking about some features of "class properties" but the example code doesn't show these features. I changed the example code to show that defining property out of the constructor method is different from defining method in class structure.1 parent dcb9d87 commit 4df1cb9
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
321 | 324 | | |
322 | 325 | | |
323 | 326 | | |
| |||
0 commit comments