This is a technique for storing attribute states in a stack.
When your mouse exits a node, it returns to the most recent state that was pushed into an array of states. This allows for state transitions.
An alternative method could use getComputedStyle to pre-compute styles from a stylesheet (which would then be used in a transition).