Use "construct" instead of "this" to define constructors.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user