The orientation of a basis is based on how we attempt to perceive the construction of the space. Thinking abstractly for a moment, suppose that, in 3D space, I give you the basis vectors for $x$ and $y$ and ask you which way $z$ points. You know that $z$ must be the direction perpendicular to the $x$ and $Y$ directions, but there is an issue with this, since there are two possibilities. As an example, consider a piece of paper, which when lying flat contains the $x$ and $y$ directions. If I asked you which way is "out of the page'', you may see the issue.
It is then convention to establish what we call a positive orientation of the coordinate system. We define the positive $z$ direction to be the following: face the $x$ direction such that you are looking down the axis, meaning in the negative direction (if the positive direction had a vector, you would be looking directly at the arrowhead). Rotate around this axis such that the $y$ direction points directly to your right. We define the $z$ direction to be directly upward.
This formulation gets the name of a positive orientation. Had we pointed the $z$ direction in the opposite direction, then we would call it a negative orientation. We also often use the words "right handed" and "left handed", respectively, when referring to how these vectors relate via the cross product, but isn't necessary for this discussion.
Lets suppose that we picked $z$ to point the opposite direction. If we flipped the entire coordinate system upside down so that $z$ was once again pointing up, then we would have noticed that $x$ and $y$ "appeared" to switch places. This is sort of what has happened; a negative orientation is equivalent to switching two vectors of a positive orientation. As one might expect, switching two vectors of a negative orientation begets a positive orientation.
Therefore, a positive orientation is an orientation that can be returned to the standard $e_1e_2e_3$ orientation with an even number of switches, and a negative orientation can be returned with an odd number of switches.
Your first example should be clear that it is a positive orientation. Your second example is a negative orientation, since it takes one switch to put it back to standard orientation.
I hope you find this explanation helpful!
Side Note: this methodology is applied to an arbitrary number of dimensions, so long as we define what a positive orientation means in the first place.