Last active
February 4, 2019 11:27
-
-
Save hirokiky/b0ae4a559fc6dae34eb70d4fcf9444d6 to your computer and use it in GitHub Desktop.
experiment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> class F { | |
... constructor (a) { | |
..... if (a > 0) { | |
....... this.child = new F(a-1) | |
....... } | |
..... } | |
... } | |
undefined | |
> new F(3) | |
F { child: F { child: F { child: F {} } } } | |
> new F(8) | |
F { child: F { child: F { child: [F] } } } | |
> var f = new F(8) | |
undefined | |
> f.child | |
F { child: F { child: F { child: [F] } } } | |
> f.child.child.child.child | |
F { child: F { child: F { child: [F] } } } | |
> f.child.child.child.child.child | |
F { child: F { child: F { child: F {} } } } | |
> f.child.child.child.child.child.child | |
F { child: F { child: F {} } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment