The nodeName property is part of the browser's internal DOM management. It contains a value that is the name of the HTML tag that instantiated the object. This is also reflected as the tagName property.
When the object is a Text object, the nodeName value is "#text" because there is no HTML tag to represent plain text and a text node is placed between HTML Element objects. It's like the mortar between the bricks in a wall.