Need clarification on self. vs hero

So I have been wondering about the difference between the self. and the hero. commands. I used them both in code, and both result in successful runs. Would self. is the same as saying hero.?


(the reply needs to be at least 20 characters)