While reading about DOM node object types from the book DOM Enlightenment (http://domenlightenment.com/#1.2), I found it weird that multiple object types map to the same numeric value. For example, ELEMENT_NODE and DOCUMENT_POSITION_DISCONNECTED map to 1, ATTRIBUTE_NODE and DOCUMENT_POSITION_PRECEDING map to 2, and so on. You can run
for(var key in Node){
console.log(key,' = ' + Node[key]);
};
to see the list of all the supported node object types and their numeric value.
Could someone please help me understand why multiple node object types map to the same numeric value?