Use "construct" instead of "this" to define constructors.

This commit is contained in:
Bob Nystrom
2015-07-21 07:24:53 -07:00
parent ed8ec262e4
commit 71ab3ca887
31 changed files with 68 additions and 81 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
class Toggle {
this new(startState) {
construct new(startState) {
_state = startState
}
@@ -11,7 +11,7 @@ class Toggle {
}
class NthToggle is Toggle {
this new(startState, maxCounter) {
construct new(startState, maxCounter) {
super(startState)
_countMax = maxCounter
_count = 0