nodeType

Returns the type of node.

MDN Reference