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
+1 -1
View File
@@ -1,7 +1,7 @@
// Ported from the Python version.
class Tree {
this new(item, depth) {
construct new(item, depth) {
_item = item
if (depth > 0) {
var item2 = item + item