It's in the tutorial, but it's worded as "just always take the last digit ", in math terms, it's the "modular 10 " of the "absolute value" of the addition or subtraction.
Absolute value means "if negative, make it positive " and is denoted with putting it in |bars|.
Modular means if you go under 0 or over the mod number (10 in this case), you end up at the other side. just imagine a circle.