I know that no matter where functions and variables are declared, they are moved to the top of their scope regardless of whether their scope is global or local.
However, I can't seem to understand why the hoisting mechanism only moves the declaration. The assignments are left in place.