README.md: fix typo
Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
This commit is contained in:
parent
271679e006
commit
749dd506ad
1 changed files with 5 additions and 1 deletions
|
@ -23,7 +23,11 @@ The library consits of an interface `Node` and an implementation `NodeItem`.
|
||||||
|
|
||||||
## Add a child node
|
## Add a child node
|
||||||
|
|
||||||
root.addChild("child");
|
root.createChild("child");
|
||||||
|
|
||||||
|
Which is shorthand for:
|
||||||
|
|
||||||
|
root.addChild(new NodeItem<>("child"));
|
||||||
|
|
||||||
The tree now looks like:
|
The tree now looks like:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue