Recursive comments example
v1
Share
Learn
Sign In
Sign Up
FILES
package.json
script.js
Items: 0
PACKAGES
Items: 0
Ruslan
✓
@ianberdin
Discord
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Comment
{
constructor
(
text
)
{
this.text = text;
this.children =
[
]
;
}
addChild
(
child
)
{
this.children.push
(
child
)
}
}
function createComment
(
i
)
{
return new Comment
(
`comment $
{
i
}
`
)
}
Console
?
1
Rename
Clone
Save
Delete
Export
Set Default
Set Favorite
Share
Save
Copy Link
Share to web
Allow editing
Online chat
Help & support guide
Report abuse
Report a bug
Roadmap
Changelog
Windows App
MacOS App
Linux App
Keyboard shortcuts
Privacy
PlayCode v2025.5.15
Restart
Ctrl + R
Hard Restart
Ctrl + ⇧ + R
Live View
Live View Delay
Loop Protection
Run on Opening
Clear Logs
Clear on Run
Scroll to End