child
The designator child represents the oldest child (note) of the note currently in focus, thus the first as listed in Outline view. Mention in various references of 'oldest' deriving from creation/modification date are erroneous. 'Oldest' equates to the note whose $OutlineOrder attribute value is 1 greater than the current note's OutlineOrder value.
The logical opposite of this (first) child designator is lastChild; there is no firstChild designator.
child[N]
The designator can take an optional numbered offset N, in square brackets. N numbers up from zero and down from -1. Thus:
child[0]
is the same as child
whilst:
child[1]
is the second child
child[-1]
is the last child (i.e. lastChild)
child[-2]
is the last but one child
Legacy code issue
To avoid ambiguity, the old group-scope 'child' designator is deprecated in favour of 'children'.
See also—notes linking to here: