Restriction of endomorphism to invariant subgroup is endomorphism

Statement
Suppose $$G$$ is a group, $$H$$ is a subgroup and $$\alpha$$ is an endomorphism of $$G$$ with the property that $$\alpha(g) \in H$$ for all $$g \in H$$. Then, the restriction of $$\alpha$$ to $$H$$ defines an endomorphism of $$H$$.