---
title: getNextNode
name: node-functions-getnextnode
---

Get the next node in the tree.

-   If the node has children, return the first child.
-   If the node is the last child, return the next sibling of the parent.

Returns a node or null.

{% highlight js %}
var node = node.getNextNode();
{% endhighlight %}
