HTML DOM lastChild Property
Example
Return the last child node of the document:
document.getElementById("myList").lastChild;
Try it »
Definition and Usage
The lastChild property returns the last child node of the document.
Browser support





All major browsers support the lastChild property
Syntax
node
.lastChild
Technical Details
| Return Value: | The last child node |
|---|---|
| DOM version | Core Level 1 Node Object |
Element object